Java, BFS solution
\nclass Solution {\n    public int[][] highestPeak(int[][] isWater) {\n        int row = isWater.length;\n        int col = isWater[0].length;\n        int[][] 
```\nclass Solution {\n    public int[][] highestPeak(int[][] isWater) {\n        int row = isWater.length;\n        int col = isWater[0].length;\n        int[][] ans = new int[row][col];\n        \n        Queue<int[]> q = new LinkedList();\n        for (int i = 0; i < row; i++) {\n            for (int j = 0; j < col; j++) {\n                ans[i][j] = Integer.MAX_VALUE;\n                if (isWater[i][j] == 1) {\n                    q.add(new int[]{i, j});\n                }\n            }\n        }\n        int dist = 0;\n        while (!q.isEmpty()) {\n            int size = q.size();\n            for (int k = 0; k < size; k++) {\n                int[] val = q.remove();\n                int r = val[0];\n                int c = val[1];\n                if (r < 0 || r >= row || c < 0 || c >= col || ans[r][c] != Integer.MAX_VALUE || ans[r][c] < dist) continue;\n                ans[r][c] = dist;\n                q.add(new int[]{r + 1, c});\n                q.add(new int[]{r -1, c});\n                q.add(new int[]{r, c + 1});\n                q.add(new int[]{r, c - 1});\n            }\n            dist++;\n        }\n        return ans;\n    }\n}\n```
[]