[💾💾💾] 🥷👨‍💻💀
Intuition\nPass the ball around and whoever doesn\'t get to touch the cool ball is a loser.\n\n# Approach\nSimulate the game with a loop from 1 to n, keeping tr
# Intuition\nPass the ball around and whoever doesn\'t get to touch the cool ball is a loser.\n\n# Approach\nSimulate the game with a loop from `1 to n`, keeping track of the `losers` in a set. Remove players from `losers` that receive the ball `b`.\n\n# Complexity\n- Time complexity: $$O(n)$$\n- Space complexity: $$O(n)$$\n\n# Code\n```python\nclass Solution:\n    def circularGameLosers(self, n: int, k: int) -> set[int]:\n        losers = set(range(1, n + 1))\n        b = 1\n\n        for i in range(1, n + 1):\n            losers.discard(b)\n            b = (b + k * i - 1) % n + 1\n\n            if b not in losers:\n                break\n\n        return losers\n```
['Simulation', 'Python3']