<qiyuangong>937_Reorder_Log_Files_1.java
public String[] reorderLogFiles(String[] logs) {
        Arrays.sort(logs, (log1, log2) -> {
            String[] split1 = log1.split(" ", 2);
            String[] split2 = log2.split(" ", 2);
            boolean isDigit1 = Character.isDigit(split1[1].charAt(0));
            boolean isDigit2 = Character.isDigit(split2[1].charAt(0));
            if (!isDigit1 && !isDigit2) {
                int cmp = split1[1].compareTo(split2[1]);
                if (cmp != 0) return cmp;
                return split1[0].compareTo(split2[0]);
            }
            return isDigit1 ? (isDigit2 ? 0 : 1) : -1;
        });
        return logs;
    }
public String [ ] var_0 ( String [ ] var_2 ) {
  Arrays . sort ( var_2 , ( var_5 , var_6 ) -> {
    String [ ] var_10 = var_5 . split ( " " , 2 ) ;
    String [ ] var_11 = var_6 . split ( " " , 2 ) ;
    boolean var_18 = Character . isDigit ( var_10 [ 1 ] . charAt ( 0 ) ) ;
    boolean var_19 = Character . isDigit ( var_11 [ 1 ] . charAt ( 0 ) ) ;
    if ( ! var_18 && ! var_19 ) {
      int var_21 = var_10 [ 1 ] . compareTo ( var_11 [ 1 ] ) ;
      if ( var_21 != 0 ) return var_21 ;
      return var_10 [ 0 ] . compareTo ( var_11 [ 0 ] ) ;
    }
    return var_18 ? ( var_19 ? 0 : 1 ) : - 1 ;
  }
  ) ;
  return var_2 ;
}
