Search
⌘K
Get Premium
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.
All Regions
Late November, 2025
Meta
Staff
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.