You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hint 1
Run BFS starting from the '*' position.
Hint 2
Keep the current number of the steps as a state in the queue.
Hint 3
The first time you reach a food, return the number of steps as the answer.
Hint 4
In case the queue is empty and you still did not manage to reach a food, return -1.