Python O(n) Solution with Explanation
\nclass Solution:\n    def mostVisited(self, n: int, rounds: List[int]) -> List[int]:\n        output = []\n        \n        # Starting at rounds[0], we\'ll go
```\nclass Solution:\n    def mostVisited(self, n: int, rounds: List[int]) -> List[int]:\n        output = []\n        \n        # Starting at rounds[0], we\'ll go through X full cycles based on rounds inbetween. What matters is the end position.\n        # The numbers between start ... end are visited 1 extra time\n        # Case 1: start <= end\n        # -> start .. end\n        # Case 2: start > end\n        # -> 1 .. end .. start\n        \n        if rounds[0] <= rounds[-1]:\n            return list(range(rounds[0], rounds[-1] + 1))\n        else:\n            return [i for i in range(1, rounds[-1] + 1)] + [i for i in range(rounds[0], n + 1)]\n        \n```
[]