C# trivial solution with visited counters | 134ms 100%
I solved it this way, but I feel that it is not neccessary to track visited and with step to find the max and create result list. It looks like only need to fin
I solved it this way, but I feel that it is not neccessary to track visited and with step to find the max and create result list. It looks like only need to find tail of the movements correlated with starting position. Will try to solve it this way and post.\nMy more optimal solution is - https://leetcode.com/problems/most-visited-sector-in-a-circular-track/solutions/2928423/c-fast-solution-with-track-head-and-tail-131ms-100/\n\nHave no idea why people downvote this riddle. It is funny.\n# Code\n```\npublic class Solution {\n    public IList<int> MostVisited(int n, int[] rounds) \n    {\n        var visited = new int [n + 1];\n\n        visited[rounds[0]]++;\n\n        for(var i = 1; i < rounds.Length; i++)\n        {\n            var from = rounds[i-1] + 1; \n\n            var to = rounds[i] < from ? rounds[i] + n : rounds[i];\n\n            for(var j = from; j <= to; j++)\n            {\n                visited[(j > n) ? j - n : j]++;                \n            }\n        }\n\n        var max = visited.Max();\n\n        var mostVisited = new List<int>(n);\n\n        for(var i=1; i <=n; i++)\n        {\n            if(visited[i] == max)\n                mostVisited.Add(i);\n        }\n\n        return mostVisited;\n    }\n}\n```
['C#']