https://leetcode.com/problems/longest-increasing-subsequence


Time Limit Exceeded


```python
class Solution:
    def lengthOfLIS(self, nums: List[int]) -> int:
        #8:55
        if len(nums) == 1:
            return 1
        
        self.max_counting = 0
        def travel(i, tempList):
            if i >= len(nums) - 1:
                #print(tempList)
                length = len(tempList)
                if length > self.max_counting:
                    self.max_counting = length
                return 
            else:
                for new_i in range(i, len(nums)):
                    num = nums[new_i]
                    if len(tempList) == 0:
                        travel(new_i, tempList + [num])
                    else:
                        if num > tempList[-1]:
                            travel(new_i, tempList + [num])
                        else:
                            length = len(tempList)
                            if length > self.max_counting:
                                self.max_counting = length
        
        travel(0, [])
        
        return self.max_counting
        #9:10
        #debug and add logic until 9:28
```
