<awangdev>Summary Ranges_1.java
public List<String> summaryRanges(int[] nums) {
     List<String> rst = new ArrayList<>();
     if (nums == null || nums.length == 0) {
     	return rst;
     }   
     List<Integer> list = new ArrayList<>();
     for (int i = 0; i < nums.length; i++) {
     	list.add(nums[i]);
     	if (i + 1 == nums.length || nums[i] + 1 != nums[i + 1]) {
     		if (list.size() == 1) {
     			rst.add(list.get(0) + "");
     		} else {
     			rst.add(list.get(0) + "->" + list.get(list.size() - 1));
     		}
     		list = new ArrayList<Integer>();
     	}
     }
     return rst;
    }
public List < String > var_1 ( int [ ] var_2 ) {
  List < String > var_5 = new ArrayList < > ( ) ;
  if ( var_2 == null || var_2 . length == 0 ) {
    return var_5 ;
  }
  List < Integer > var_10 = new ArrayList < > ( ) ;
  for ( int var_11 = 0 ;
  var_11 < var_2 . length ;
  var_11 ++ ) {
    var_10 . add ( var_2 [ var_11 ] ) ;
    if ( var_11 + 1 == var_2 . length || var_2 [ var_11 ] + 1 != var_2 [ var_11 + 1 ] ) {
      if ( var_10 . size ( ) == 1 ) {
        var_5 . add ( var_10 . get ( 0 ) + "" ) ;
      }
      else {
        var_5 . add ( var_10 . get ( 0 ) + "->" + var_10 . get ( var_10 . size ( ) - 1 ) ) ;
      }
      var_10 = new ArrayList < Integer > ( ) ;
    }
  }
  return var_5 ;
}
