✅💯Very Easy Solution | Python 🔥🔥
Code\n\nclass Solution:\n    def numberOfChild(self, n: int, k: int) -> int:\n        eff = k % (2 * (n - 1))\n        p = 0\n        d = 1 \n        \n        
# Code\n```\nclass Solution:\n    def numberOfChild(self, n: int, k: int) -> int:\n        eff = k % (2 * (n - 1))\n        p = 0\n        d = 1 \n        \n        for _ in range(eff):\n            if p == 0:\n                d = 1 \n            elif p == n - 1:\n                d = -1 \n            \n            p += d\n        \n        return p\n```
['Python3']