← Amazon questions

Shortest path in a binary maze

Filed under Amazon · Also reported at Goldman Sachs, Trimble

Given a binary matrix where 0 represents a wall and 1 represents a path, find the shortest path length from a source coordinate to a destination coordinate.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.