 One line Solution 🚀|| 💡 Simple Math-Based Logic ||  🔥 Beginner Friendly || 🧑‍💻 Clean Code
IntuitionThe problem can be solved using modular arithmetic to determine the position of a child after a given number of steps. The idea is to simulate the circ
# Intuition
The problem can be solved using modular arithmetic to determine the position of a child after a given number of steps. The idea is to simulate the circular behavior of counting, where positions wrap around after reaching the end.

# Approach
1. Calculate the effective position using the modulo operator to handle circular traversal.
2. Adjust the result to account for the symmetry caused by the bidirectional behavior of the counting.

# Complexity
- **Time complexity:** $$O(1)$$  
  The solution involves a constant number of operations.

- **Space complexity:** $$O(1)$$  
  No additional space is required.

# Code
```java []
class Solution {
    public int numberOfChild(int n, int k) {
        return (n - 1) - Math.abs((n - 1) - k % ((n - 1) * 2));      
    }
}
```
['Math', 'Simulation', 'Java']