MOST OPTIMISED || C++ || EASY TO UNDERSTNAD
make an array of size n. initially no one have ball so all are false.\n1st person have ball\nthan 1+i*k person have ball (i = ith step)\nmodulo is use for circu
make an array of size n. initially no one have ball so all are false.\n1st person have ball\nthan 1+i*k person have ball (i = ith step)\nmodulo is use for circular\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> circularGameLosers(int n, int k) {\n        int x = 1,y=1;\n        vector<int> v(n+1,false);\n            // cout<<y<<" ";\n        while(!v[y]){\n            v[y] = true;\n            y = ((y+x*k)%n);\n            if(y==0)y = n;\n            // cout<<y<<" ";\n            x++;\n        }\n        vector<int> ans;\n        for(x = 1; x <= n; x++){\n            if(!v[x])ans.push_back(x);\n        }\n        return ans;\n    }\n};\n```
['Math', 'Game Theory', 'C++']