python 3, straightforward brutal
The commented solution was from @lee215. I did not figure it until I read his solution.\nhttps://leetcode.com/problems/most-visited-sector-in-a-circular-track/d
The commented solution was from @lee215. I did not figure it until I read his solution.\nhttps://leetcode.com/problems/most-visited-sector-in-a-circular-track/discuss/806814/JavaC%2B%2BPython-From-Start-to-End\n\nFollowing is the brutal force solution using dict.\n```\nclass Solution:\n    def mostVisited(self, n: int, rounds: List[int]) -> List[int]:\n        #\n        # return range(rounds[0], rounds[-1] + 1) or list(range(1, rounds[-1] + 1)) + list(range(rounds[0], n + 1))\n        \n        \n        \n        helper = defaultdict(int)\n        for i in range(len(rounds)-1):\n            \n            if rounds[i]<rounds[i+1]:\n                for j in range(rounds[i],rounds[i+1]):\n                    helper[j] += 1\n            else:\n                for j in range(rounds[i],rounds[i+1]+n):\n                    \n                    if j == n:\n                        k = n\n                    else:\n                        k = j%n\n                    helper[k] += 1\n                    \n        \n        helper[rounds[-1]] += 1\n        \n        mostvisit = max(helper.values())\n        return sorted([k for k,v in helper.items() if v == mostvisit])\n```
['Python', 'Python3']