Beat 100% - Python
IntuitionApproachComplexity

Time complexity:
O(n)


Space complexity:

Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

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

# Complexity
- Time complexity:
O(n)

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

# Code
```python3 []
class Solution:
    def mostVisited(self, n: int, rounds: List[int]) -> List[int]:
        first=rounds[0]
        last=rounds[-1]
        if last>=first:
            return [i for i in range(first,last+1,1)]
        else:
            return [i for i in range(1,last+1,1)]+[i for i in range(first,n+1,1)]



```
['Python3']