c++ | easy | short
\n\n# Code\n\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        vector <int> ans;\n        int size = rounds.size();
\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        vector <int> ans;\n        int size = rounds.size();\n        \n        if(rounds[0] <= rounds[size-1]) {\n            for(int i=rounds[0]; i<= rounds[size-1]; i++) {\n                ans.push_back(i);\n            }\n            return ans;\n        }\n        else {\n            for(int i=1; i<= rounds[size-1]; i++) {\n                ans.push_back(i);\n            }   \n            \n            for(int i=rounds[0]; i<=n; i++) {\n                ans.push_back(i);\n            }\n        }\n        \n        return ans;\n    }\n};\n```
['C++']