Set + stream
\n# Code\n\nclass Solution {\n    public int[] circularGameLosers(int n, int k) {\n        Set<Integer> set = new HashSet<>();\n        int index = 0;\n        
\n# Code\n```\nclass Solution {\n    public int[] circularGameLosers(int n, int k) {\n        Set<Integer> set = new HashSet<>();\n        int index = 0;\n        int i = 1;\n        set.add(0);\n\n        while (true) {\n            int idx = (i++ * k + index) % n;\n            if (!set.add(idx)) break;\n            index = idx;\n        }\n\n        return IntStream.range(1, n)\n                .filter(idx -> !set.contains(idx))\n                .map(idx -> idx + 1)\n                .toArray();\n    }\n}\n```
['Java']