pointer approach easy and quick
Intuitionuse one pointer, traverse the list onceApproachComplexity
Time complexity:
O(n)
Space complexity:
O(1)Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
use one pointer, traverse the list once
# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. c -->
$$O(n)$$
- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
$$O(1)$$
# Code
```python3 []
class Solution:
    def findLengthOfLCIS(self, nums: List[int]) -> int:
        # deal with edge case
        if len(nums) == 1:
            return 1

        # specify variables - we only need one pointer 
        # as we will have to check one by one anyway so we can use 
        # pointer and pointer + 1 to achieve this
        idx, curr, longest = 0, 1, 1
        # since we will use pointer + 1, we only traverse the first n - 1 elements
        while idx < len(nums) - 1:
            # if strictly increasing, update the current counter
            # and immediately compare with the current max and update
            if nums[idx + 1] > nums[idx]:
                curr += 1
                longest = max(longest, curr)
            # if not strictly increasing then reset the counter
            else:
                curr = 1
            # and only now do we update the counter as it applies to both if and else
            idx += 1
        
        return longest
        
```
['Python3']