comefrom: <awangdev>Group Shifted Strings_2.java
code: public List<List<String>> groupStrings(String[] strings) {
          List<List<String>> rst = new ArrayList<List<String>>();
          if (strings == null || strings.length == 0) {
              return rst;
          }
          Arrays.sort(strings);
          HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();
          
          for (String s : strings) {
              char[] arr = s.toCharArray();
              char head = arr[0];
              for (int i = 0; i < arr.length; i++) {
                  if (arr[i] - head < 0) {
                      arr[i] = (char)((arr[i] - head) + 26);
                  } else {
                      arr[i] = (char)(arr[i] - head);
                  }
              }
              String key = new String(arr);
              if (!map.containsKey(key)) {
                  map.put(key, new ArrayList<String>());
              }
              map.get(key).add(s);
          }
          
          for (Map.Entry<String, ArrayList<String>> entry : map.entrySet()) {
              rst.add(entry.getValue());
          }
          return rst;
      }
masked: public List < List < String >> var_2 ( String [ ] var_3 ) {
    List < List < String >> var_5 = new ArrayList < List < String >> ( ) ;
    if ( var_3 == null || var_3 . length == 0 ) {
      return var_5 ;
    }
    Arrays . sort ( var_3 ) ;
    HashMap < String , ArrayList < String >> var_12 = new HashMap < String , ArrayList < String >> ( ) ;
    for ( String var_13 : var_3 ) {
      char [ ] var_15 = var_13 . toCharArray ( ) ;
      char var_16 = var_15 [ 0 ] ;
      for ( int var_17 = 0 ;
      var_17 < var_15 . length ;
      var_17 ++ ) {
        if ( var_15 [ var_17 ] - var_16 < 0 ) {
          var_15 [ var_17 ] = ( char ) ( ( var_15 [ var_17 ] - var_16 ) + 26 ) ;
        }
        else {
          var_15 [ var_17 ] = ( char ) ( var_15 [ var_17 ] - var_16 ) ;
        }
      }
      String var_19 = new String ( var_15 ) ;
      if ( ! var_12 . containsKey ( var_19 ) ) {
        var_12 . put ( var_19 , new ArrayList < String > ( ) ) ;
      }
      var_12 . get ( var_19 ) . add ( var_13 ) ;
    }
    for ( Map . Entry < String , ArrayList < String >> var_25 : var_12 . entrySet ( ) ) {
      var_5 . add ( var_25 . getValue ( ) ) ;
    }
    return var_5 ;
  }
  