Search
⌘K

Leetcode 778. Swim in Rising Water

Find the minimum time t such that there is a 4-directional path from the top-left to bottom-right of an n×n grid using only cells with elevation ≤ t (water rises to level t). This is a minimax path problem — solvable by binary search with BFS/DFS or by Dijkstra/priority-queue that minimizes the maximum elevation along the path.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late November, 2025

Meta

Staff

Comments

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