C++ || Easy approach
Here is my c++ code for this problem.\n\n# Complexity\n- Time complexity:O(n)\n\n- Space complexity:O(n)\n\n# Code\n\nclass Solution {\npublic:\n    vector<int>
Here is my c++ code for this problem.\n\n# Complexity\n- Time complexity:$$O(n)$$\n\n- Space complexity:$$O(n)$$\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> circularGameLosers(int n, int k) {\n        vector<int>v(n, 0), ans;\n        int i=0, turn=1;\n        while(v[i]!=1){\n            v[i]=1;\n            cout<<i<<" "<<(turn*k)%n<<endl;\n            i=(i+(turn*k)%n)%n;\n            turn++;\n        }\n        for(int k=0; k<n; k++){\n            if(!v[k]){\n                ans.push_back(k+1);\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']