<garvit244>128_1.py
def longestConsecutive( nums):
    result = 0
    nums = set(nums)
    
    for num in nums:
        if num-1 not in nums:
            curr = num
            length = 1
    
            while curr+1 in nums:
                curr += 1
                length += 1
            result = max(result, length)
    return result
def sample_funcname ( var_0 ) :
    var_2 = 0
    var_0 = set ( var_0 )
    for var_4 in var_0 :
        if var_4 - 1 not in var_0 :
            var_6 = var_4
            var_7 = 1
            while var_6 + 1 in var_0 :
                var_6 += 1
                var_7 += 1
            var_2 = max ( var_2 , var_7 )
    return var_2
