C++ Solution || frequency vector
Intuition\nfrequency vector\n\n# Approach\nCreate a vector of length n with initial values 0, Simulate whole process and increment the corresponding index value
# Intuition\nfrequency vector\n\n# Approach\nCreate a vector of length n with initial values 0, Simulate whole process and increment the corresponding index value in vector till frequency of any index reaches 2,\n\nfinally Return indexes whose value is 0.\n\n# Complexity\n- Time complexity:\n\n- Space complexity:\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> circularGameLosers(int n, int k) {\n      vector<int> v(n,0);\n      vector<int> ans;\n      int i = 1;\n      int index = 0;\n      v[index]=1;\n\n      while(1){\n        if(v[index]>1){\n          break;\n        }\n        index=(index+(i*k))%n;\n        v[index]++;\n        i++;\n      }\n      for(int j=0;j<n;j++){\n        if(v[j]==0){\n          ans.push_back(j+1);\n        }\n      }\n      return ans;\n    }\n};\n```
['C++']