comefrom: <doocs>0128.Longest Consecutive Sequence_1.py
code: def longestConsecutive( nums: List[int]) -> int:
      s, res = set(nums), 0
      for num in nums:
          if num - 1 not in s:
              t, next = 1, num + 1
              while next in s:
                  t, next = t + 1, next + 1
              res = max(res, t)
      return res
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_1 , var_2 = set ( var_0 ) , 0
      for var_3 in var_0 :
          if var_3 - 1 not in var_1 :
              var_4 , var_5 = 1 , var_3 + 1
              while var_5 in var_1 :
                  var_4 , var_5 = var_4 + 1 , var_5 + 1
              var_2 = max ( var_2 , var_4 )
      return var_2
  