Search
⌘K
Get Premium
Leetcode 1765. Map of Highest Peak
Assign nonnegative heights to a grid so water cells are 0, adjacent cells differ by at most 1, and the global maximum height is maximized. This reduces to computing each cell's distance to the nearest water cell (a multi-source BFS/shortest-path on the unweighted grid).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.