โ† SAP questions

Path in Binary Matrix

Filed under SAP

The question

Determine if a valid path exists from the top-left to the bottom-right of a binary matrix moving only right and down, where 1 represents a valid path and 0 represents a block. Output any valid path if one exists.

No write-up yet. Related questions below have one.

Related SAP questions

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