📌📌 Greedy || BFS || Well-Explained 🐍
IDEA:\nStart from water nodes and BFS until all heights are found\nNOTE: You don\'t need to worry about height with difference greater than 1 on some neighbors 
## IDEA:\n*Start from water nodes and BFS until all heights are found*\nNOTE: **You don\'t need to worry about height with difference greater than 1 on some neighbors because it will never be possible**\n* For example: following situation will never be possible\n1 1 0\n1 1 2\n2 0 1\n* This is because we are using BFS and increment at 1 for each step, in this case, for any node at (i, j), whenever the value is assigned, it will be the highest possible value\n* If the same node is re-visited in later step, it can only be the same or larger (larger will be wrong, since you will get a skewed peak), thus, no need to revisited any assigned node (i, j).\n\n\'\'\'\n\n\tclass Solution:\n    def highestPeak(self, isWater: List[List[int]]) -> List[List[int]]:\n        \n        m,n = len(isWater),len(isWater[0])\n        q = collections.deque()\n        dp = [[float(\'inf\') for _ in range(n)] for _ in range(m)]\n        for i in range(m):\n            for j in range(n):\n                if isWater[i][j]==1:\n                    dp[i][j] = 0\n                    q.append([i,j,0])\n        \n        while q:\n            x,y,c = q.popleft()\n            for i,j in [(-1,0),(1,0),(0,1),(0,-1)]:\n                if 0<=x+i<m and 0<=y+j<n and dp[x+i][y+j]==float(\'inf\'):\n                    dp[x+i][y+j] = c+1\n                    q.append([x+i,y+j,c+1])\n            \n        return dp\n\n### Thanks & Upvote if you got the idea!!\uD83E\uDD1E
['Greedy', 'Breadth-First Search', 'Python', 'Python3']