hashing c++  solution
Intuition\n we will decleare a hash array of size n+1 intially marked with zero . freind will start 1 to  n . we will mark hash(i)=1 as we get the ball pass to 
# Intuition\n we will decleare a hash array of size n+1 intially marked with zero . freind will start 1 to  n . we will mark hash(i)=1 as we get the ball pass to freind  . before marking we will check that wether it is previously marked or not , if it is marked as 1 then that  freind is geeting ball second time and the game end by break out of loop    \n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n)+O(n) = O(2n)   ; \n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:  O(n) for hash array \n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> circularGameLosers(int n, int k) {\n       \n        vector<int>hash(n+1,0) ; \n         hash[1]=1 ; \n        vector<int>ans ; \n        \n          int prev  = 1 ;  \n       int  i =1 ; \n            while(1) \n            {\n               int nextstep = i*k ; \n                int move = (prev+nextstep)%n ; \n              if (move%n==0)move=n;\n              \n                if(hash[move]==0) \n                {\n                    hash[move] =1 ; \n                    prev = move ;\n                \n                }\n                else \n                {\n                    break ; \n                } \n                i++ ; \n                \n            }\n         for( int i = 1 ; i<=n ; i++) \n         {\n             if(hash[i]==0) \n                  ans.push_back(i)  ; \n         }\n      \n        \n        return ans ; \n    }\n};\n```
['C++']