Java clean code solution
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: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\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\n        // the game simulation\n        final boolean[] friends = new boolean[n];\n        int index = 0;\n        int counter = 0;\n        int loosersAmount = n;\n\n        // the game is finished when some friend receives the ball for the second time\n        while (!friends[index]) {\n            friends[index] = true;\n            --loosersAmount;\n\n            index = (index + ++counter * k) % n;\n        }\n\n        // let\'s gather the loosers\n        final int[] loosers = new int[loosersAmount];\n        int loosersCount = 0;\n        for (int i = 0; i < n; i++) {\n            if (!friends[i]) {\n                loosers[loosersCount++] = i + 1;\n            }\n        }\n\n        return loosers;\n    }\n}\n```
['Java']