Very easy and Intuitive solution  | Multi-source BFS
Intuition\n Describe your first thoughts on how to solve this problem. \npush all the water cell initially on the queue and perform bfs from those cell\n# Appro
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\npush all the water cell initially on the queue and perform bfs from those cell\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:$$O(m*n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(m*n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n\n    vector<vector<int>> highestPeak(vector<vector<int>>& isWater) {\n        int m = isWater.size(), n = isWater[0].size();\n\n        vector<vector<int>> heights(m, vector<int>(n, 0));\n\n        queue<pair<int ,int>> q;\n\n\n        for (int i=0; i<m; i++) {\n            for (int j=0; j<n; j++) {\n                if (isWater[i][j] == 1) {\n                    q.push({i, j});\n                    isWater[i][j] = 0;\n                }\n                else isWater[i][j] = -1;\n            }\n        }\n\n        int dr[] = {1, -1, 0, 0};\n\t\tint dc[] = {0, 0, -1, 1};\n        int h = 1;\n        \n        while(!q.empty()) {\n            \n            int l = q.size();\n\n            for (int i=0; i<l; i++) {\n\n                auto p = q.front(); q.pop();\n                int u = p.first, v = p.second;\n\n                for (int k = 0; k<4; k++) {\n                    int r = u + dr[k];\n                    int c = v + dc[k];\n\n                    if (r >= 0 && r < m && c >=0 && c < n && isWater[r][c] == -1) {\n                        isWater[r][c] = h;\n                        q.push({r, c});\n                    }\n                }\n            }\n            h++;\n        }\n\n        return isWater;\n    }\n};\n```
['Breadth-First Search', 'Matrix', 'C++']