Java Solution || Functional Programming || HashSets<>
Intuition\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 
# Intuition\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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int[] circularGameLosers(int n, int k) {\n        int ball = 0;\n        int multiplier = 0;\n        Set<Integer> visited = new HashSet<Integer>();\n        visited.add(0);\n        while (true) {\n            multiplier++;\n            ball = (ball + multiplier * k) % n;\n            if (visited.contains(ball)) { break; }\n            visited.add(ball);\n        }\n        Set<Integer> newVisited = visited.stream().map(\n            i -> i + 1\n        ).collect(Collectors.toSet());\n        return IntStream.range(1, n + 1).filter(\n            i -> !newVisited.contains(i)\n        ).toArray();\n    }\n}\n```
['Java']