Minimum distance to matrix edge through cells of 1s
Filed under Netskope
The question
Given a 2D array of 0s and 1s and an initial position, find the minimum distance to travel to reach any of the array edges moving only through cells marked as 1.
No write-up yet. Related questions below have one.
Related Netskope questions
Collected from public candidate posts and coding forums. Updated Nov 2026.