[Python] Intuitive DP Solution
Intuition :- The main idea is to find the length of four wingspans at each point. We can do that using the wingspans of the adjacent elements, so we can utilize
**Intuition** :- The main idea is to find the length of four wingspans at each point. We can do that using the wingspans of the adjacent elements, so we can utilize something like a dp for this. The wingspan for that point would be the mininum span value of all 4 direction spans and the final answer would be the maximum of all wingspan values(at each point). \n\n```\nclass Solution:\n    def orderOfLargestPlusSign(self, n: int, mines: List[List[int]]) -> int:\n        mines_dict = {(mine[0], mine[1]): True for mine in mines}\n        dp = {}\n        ans = 0\n\t\t\n\t\t# left and right wingspan calculation\n        for row in range(n):\n            cnt = 0\n            for col in range(n):\n                cnt = self.update_dp(dp, mines_dict, row, col, cnt)\n            cnt = 0\n            for col in range(n-1, -1, -1):\n                cnt = self.update_dp(dp, mines_dict, row, col, cnt)\n                \n        \n\t\t# top and down wingspan calculation\n        for col in range(n):\n            cnt = 0\n            for row in range(n):\n                cnt = self.update_dp(dp, mines_dict, row, col, cnt)\n            cnt = 0\n            for row in range(n-1, -1, -1):\n                cnt = self.update_dp(dp, mines_dict, row, col, cnt)\n\t\t\t\t\n\t\t\t\t# final answer would be the maximum wingspan at any point.\n                ans = max(ans, dp[row, col])\n        return ans\n            \n    \n    def update_dp(self, dp, mines_dict, row, col, cnt):\n        if (row, col) not in mines_dict:\n            cnt += 1\n            dp[row, col] = min(cnt, dp[row, col]) if (row, col) in dp else cnt\n        else:\n            cnt = 0\n            dp[row, col] = 0\n        return cnt\n```
['Dynamic Programming', 'Python3']