<awangdev>Longest Consecutive Sequence_3.java
public int longestConsecutive(int[] num) {
        if (num == null || num.length == 0) {
            return 0;
        }
        if (num.length == 1) {
            return 1;
        }
        int count = 1;
        int max = 1;
        Arrays.sort(num);
        for (int i = 1; i < num.length; i++) {
            if (num[i - 1] == num[i]) {
                   continue;
            } else if (num[i - 1] + 1 == num[i]) {
                count++;
                max = Math.max(count, max);
            } else {
                count = 1;
            }
        }
        return max;
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return 0 ;
  }
  if ( var_0 . length == 1 ) {
    return 1 ;
  }
  int var_5 = 1 ;
  int max = 1 ;
  Arrays . sort ( var_0 ) ;
  for ( int var_9 = 1 ;
  var_9 < var_0 . length ;
  var_9 ++ ) {
    if ( var_0 [ var_9 - 1 ] == var_0 [ var_9 ] ) {
      continue ;
    }
    else if ( var_0 [ var_9 - 1 ] + 1 == var_0 [ var_9 ] ) {
      var_5 ++ ;
      max = Math . max ( var_5 , max ) ;
    }
    else {
      var_5 = 1 ;
    }
  }
  return max ;
}
