Simple C++ solution without using sort
\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        vector<int> count(n+1,0);\n        vector<int> ans;\n        int
```\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        vector<int> count(n+1,0);\n        vector<int> ans;\n        int no;\n        count[rounds[0]]++;\n        for(int i=0;i+1<rounds.size();i++){\n            if(rounds[i+1]<rounds[i]){\n               no= n- rounds[i];\n                no+=rounds[i+1];\n            }\n            else{\n                no=rounds[i+1]-rounds[i];\n            }\n            int j=rounds[i]+1;\n            while(no>0){\n                j=j%n;\n                if(j==0) count[n]++;\n                else count[j]++;\n                no--;\n                j++;\n            }\n            no=0;\n        }\n        int maxxy=0;\n        for(auto it: count){\n            if(it>maxxy){\n                maxxy=it;\n            }\n        }\n        for(int k=1;k<count.size();k++){\n            if(count[k]==maxxy) ans.push_back(k);\n        }\n        return ans;\n    }\n};\n```
[]