C++ {Speed,Mem} = {O(n), O(n)}
\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        \n        vector<int> vec;\n                    \n        //case
```\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        \n        vector<int> vec;\n                    \n        //case 1\n        if(rounds[0] <= rounds[rounds.size()-1]){\n            for(int i=rounds[0]; i <= rounds[rounds.size()-1]; i++)\n                vec.push_back(i);\n            return vec;\n        }\n        \n        //case 2\n        for(int i=1; i <=rounds[rounds.size()-1]; i++)\n            vec.push_back(i);\n        \n        for(int i=rounds[0]; i <=n; i++)\n            vec.push_back(i);\n        \n        return vec;\n        \n            \n        \n    }\n};\n```
[]