easy solution
Intuitionobserve that starts at 1ApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
observe that starts at 1

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class LUPrefix:

    def __init__(self, n: int):
        self.n = n
        self.myset = set()
        self.start = 1
        

    def upload(self, video: int) -> None:
        self.myset.add(video)
        #print(self.myset)
        while self.start in self.myset:
            self.start += 1

    def longest(self) -> int:
        #print(self.start)
        return self.start - 1
  
        


# Your LUPrefix object will be instantiated and called as such:
# obj = LUPrefix(n)
# obj.upload(video)
# param_2 = obj.longest()
```
['Python3']