← Morgan Stanley questions

Escape the grid within time limit

Filed under Morgan Stanley

Given an m x n grid where '#' represents lava, determine if a path exists from (0,0) to (m-1, n-1) such that the path length is at most k. Movement is allowed in 4 directions.

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.