← Amazon questions

Find all possible paths in a matrix from (0,0) to (n-1,m-1)

Filed under Amazon

Given a matrix filled with zeros and ones, find if there is a path from (0,0) to (n-1, m-1) and write code to print all possible paths using backtracking.

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.