DIRECT APPROACH || BASIC SIMULATION
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nJUST KEEP ON ITERATIONG
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nJUST KEEP ON ITERATIONG AS IT SAYS AND YOU ARE DONE.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\no(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int numberOfChild(int n, int k) {\n        int time=0;\n        while(true){\n            for(int i=1;i<=n-1;i++){\n                time++;\n                if(k==time){\n                    return i;\n                } \n                \n            }\n            for(int i=n-2;i>=0;i--){\n                time++;\n                if(k==time){\n                    return i;\n                }\n            }\n            \n        }\n    }\n}\n```
['Simulation', 'Java']