← ALL NOTES
Array

1765. Map of Highest Peak

Given isWater (1=water, 0=land), assign heights: water is 0, adjacent cells differ by at most 1, and the maximum height is as large as possible. Return any valid height map. The answer: each cell's…

Loading…