A simple solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n\n\n# Complexity\n- Time complexity:\n Add your time complexity here, e.g
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n\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```\n/**\n * Note: The returned array must be malloced, assume caller calls free().\n */\n\nint *circularGameLosers(int n, int k, int *returnSize)\n{\n\tint aux[n], i, pos, add;\n\tint *res, count;\n\n\taux[0] = 1;\n\tfor ( i = 1; i < n; i++ )\n\t\taux[i] = 0;\n\n\tfor ( pos = 0, add = 0, count = 1; ; )\n\t{\n\t\tadd += k;\n\t\tpos += add;\n\n\t\tif ( aux[pos % n] == 1 )\n\t\t\tbreak;\n\n\t\tcount++;\n\t\taux[pos % n] = 1;\n\t}\n\n\tres = malloc( (n - count) * sizeof( int ) );\n\t*returnSize = n - count;\n\n\tfor ( i = 0, pos = 0; i < n; i++ )\n\t\tif ( aux[i] == 0 )\n\t\t\tres[pos++] = i + 1;\n\n\treturn res;\n}\n```
['C']