parameters: (self, nums)
return_statement: return len(mem)
docstring: :type nums: List[int]
          :rtype: int
docstring_summary: :type nums: List[int]
          :rtype: int
docstring_tokens: : type nums : List [ int ] : rtype : int
function: def lengthOfLIS(self, nums):
          """
          :type nums: List[int]
          :rtype: int
          """
          mem = list()
          len_nums = len(nums)
          for i in range(len_nums):
              low, upper = 0, len(mem)
              while low < upper:
                  mid = (upper - low)//2 + low
                  if mem[mid] < nums[i]:
                      low = mid + 1
                  else:
                      upper = mid
  
              if upper == len(mem):
                  mem.append(nums[i])
              else:
                  mem[upper] = nums[i]
          
          return len(mem)
function_tokens: def lengthOfLIS ( self , nums ) : mem = list ( ) len_nums = len ( nums ) for i in range ( len_nums ) : low , upper = 0 , len ( mem ) while low < upper : mid = ( upper - low ) // 2 + low if mem [ mid ] < nums [ i ] : low = mid + 1 else : upper = mid if upper == len ( mem ) : mem . append ( nums [ i ] ) else : mem [ upper ] = nums [ i ] return len ( mem )