comefrom: <awangdev>Longest Consecutive Sequence_1.java
code: public int longestConsecutive(int[] nums) {
          if (nums == null || nums.length == 0) {
              return 0;
          }
          Set<Integer> set = new HashSet<>();
          for (int num : nums) {
              set.add(num);
          }
          
          int longest = 0;
          for (int num : nums) {
              int start = num;
              while (set.contains(start - 1)) {
                  start--;
                  set.remove(start);
              }
              
              int end = num;
              while (set.contains(end + 1)) {
                  end++;
                  set.remove(end);
              }
              longest = Math.max(longest, end - start + 1);
          }
          return longest;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) {
      return 0 ;
    }
    Set < Integer > var_1 = new HashSet < > ( ) ;
    for ( int var_2 : var_0 ) {
      var_1 . add ( var_2 ) ;
    }
    int var_3 = 0 ;
    for ( int var_2 : var_0 ) {
      int var_4 = var_2 ;
      while ( var_1 . contains ( var_4 - 1 ) ) {
        var_4 -- ;
        var_1 . remove ( var_4 ) ;
      }
      int var_5 = var_2 ;
      while ( var_1 . contains ( var_5 + 1 ) ) {
        var_5 ++ ;
        var_1 . remove ( var_5 ) ;
      }
      var_3 = Math . max ( var_3 , var_5 - var_4 + 1 ) ;
    }
    return var_3 ;
  }
  