C++ Easy Prefix Sum Solution
\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        vector<int> vec(n+2,0);\n        vec[rounds[0]]++;\n        vec[
```\nclass Solution {\npublic:\n    vector<int> mostVisited(int n, vector<int>& rounds) {\n        vector<int> vec(n+2,0);\n        vec[rounds[0]]++;\n        vec[rounds[1]+1]--;\n        for(int i=2;i<rounds.size();i++){\n            int l=rounds[i-1];\n            int r=rounds[i];\n            vec[l+1]+=1;\n            vec[r+1]-=1;\n        }\n      \n        for(int i=1;i<=(n+1);i++){\n            vec[i]+=vec[i-1];\n        }\n        \n        vector<int> ans;\n        int an=0;\n        for(int i=1;i<=n;i++){\n            if(vec[i]>an){\n                ans.clear();\n                an=vec[i];\n                ans.push_back(i);\n            }\n            else if(vec[i]==an){\n                ans.push_back(i);\n            }\n        }\n        return ans;\n        \n    }\n};\n```
['C', 'Prefix Sum', 'C++']