← All problemsSign in

1765. Map of Highest Peak

LeetCodeArrayBreadth-First SearchMatrixOpen on judge ↗

You are given an integer matrix isWater of size m x n that represents a map of land and water cells. - If isWater[i][j] == 0, cell (i, j) is a land cell. - If isWater[i][j] == 1, cell (i, j) is a water cell. You must assign each cell a height in a way that follows these rules: - The height of each cell must be non-negative. - If the cell is a water cell, its height must be 0. - Any two adjac

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start