




Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
You can simulate the movements since the limits are low.
Is there a search algorithm applicable to this problem?
Since we want the minimum number of moves, we can use Breadth First Search.