Leetcode 1036. Escape a Large Maze
Determine if you can reach target from source on a 10^6Ć10^6 grid with at most 200 blocked cells ā the key challenge is that the blocked cells can form a small enclosed region despite the huge grid, so you must detect enclosure rather than search the whole grid. The typical approach is a bounded BFS/DFS from both source and target limited by the maximum area those blocked cells can enclose (āO(N^2) with Nā¤200) to decide reachability.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.