Simple solution -> 0 ms
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:\nO(1)\n\n- Space complexity:\nO(1)\n\n# Code\n```java []\nclass Solution {\n    public int numberOfChild(int n, int k) {\n\n        k %= 2 * (n - 1);\n\n        return k < n ? k : 2 * (n - 1) - k;\n    }\n}\n```
['Java']