comefrom: <garvit244>300_1.py
code: def lengthOfLIS( nums):
      if len(nums) <= 1:
          return len(nums)
      
      count = [0 for _ in range(len(nums))]
      result = 1
      count[0] = nums[0]
      
      for index in range(1, len(nums)):
          if nums[index] < count[0]:
              count[0] = nums[index]
          elif nums[index] > count[result-1]:
              count[result] = nums[index]
              result += 1
          else:
              left, right = -1, result-1
              while (right-left > 1):
                  mid = (left+right)/2
                  if count[mid] >= nums[index]:
                      right = mid
                  else:
                      left = mid
              count[right] = nums[index]
      
      return result
masked: def sample_funcname ( var_0 ) :
      if len ( var_0 ) <= 1 :
          return len ( var_0 )
      var_6 = [ 0 for var_4 in range ( len ( var_0 ) ) ]
      var_7 = 1
      var_6 [ 0 ] = var_0 [ 0 ]
      for var_8 in range ( 1 , len ( var_0 ) ) :
          if var_0 [ var_8 ] < var_6 [ 0 ] :
              var_6 [ 0 ] = var_0 [ var_8 ]
          elif var_0 [ var_8 ] > var_6 [ var_7 - 1 ] :
              var_6 [ var_7 ] = var_0 [ var_8 ]
              var_7 += 1
          else :
              var_9 , var_10 = - 1 , var_7 - 1
              while ( var_10 - var_9 > 1 ) :
                  var_12 = ( var_9 + var_10 ) / 2
                  if var_6 [ var_12 ] >= var_0 [ var_8 ] :
                      var_10 = var_12
                  else :
                      var_9 = var_12
              var_6 [ var_10 ] = var_0 [ var_8 ]
      return var_7
  