java codility training Genomic-range-query

后端 未结 30 2953
悲哀的现实
悲哀的现实 2021-02-01 12:47

The task is:

A non-empty zero-indexed string S is given. String S consists of N characters from the set of upper-case English letters A, C, G, T.

<
30条回答
  •  你的背包
    2021-02-01 13:31

    import java.util.Arrays;
    import java.util.HashMap;
    class Solution {
    
       static HashMap characterMapping = new HashMap(){{
        put('A',1);
        put('C',2);
        put('G',3);
        put('T',4);
      }};
    
      public static int minimum(int[] arr) {
    
        if (arr.length ==1) return arr[0];
    
        int smallestIndex = 0;
        for (int index = 0; index

提交回复
热议问题