Search
⌘K

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.

Comments

Your account is free and you can post anonymously if you choose.