Search
⌘K

Leetcode 1730. Shortest Path to Get Food

Given a 2D grid with open cells, walls, a starting cell, and one or more food cells, find the minimum number of steps to reach the nearest food using 4-directional moves. Core challenge: perform a shortest-path search on the grid (BFS) while handling obstacles and boundaries, returning -1 if no food is reachable.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.