← Morgan Stanley questions

Reach queen location in 2D matrix

Filed under Morgan Stanley

Given a binary 2D matrix where 1 is walkable and 0 is blocked, determine if a path exists from (0,0) to a target (r, c). You can move only down or right.

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 Morgan Stanley questions

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