Easy to understand python code
Intuition\nwe have asked to find the area of largest possible square that can be formed within the overlapping region\n\n# Approach\n1. first we will find the o
# Intuition\nwe have asked to find the area of largest possible square that can be formed within the overlapping region\n\n# Approach\n1. first we will find the over lapping region \n2. then we gonna find the new height and width of the new region \n3. now we will choose the min of the width and height (do not return the h*w) we have been asked the area of largest square not rectange \n4. so we wil return square of min(h,w)\n\n# Complexity\n- Time complexity: o(n^2)\n\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution:\n    def largestSquareArea(self, bL: List[List[int]], tR: List[List[int]]) -> int:\n        \n        n=len(bL)\n        ans=0\n        \n        for i in range(n):\n            for j in range(i+1,n):\n\n\n                \n                nbL = [max(bL[i][0], bL[j][0]), max(bL[i][1], bL[j][1])]\n                ntR = [min(tR[i][0], tR[j][0]), min(tR[i][1], tR[j][1])]\n                \n                if nbL[0] < ntR[0] and nbL[1] < ntR[1]:\n                    h = min(tR[i][1], tR[j][1]) - max(bL[i][1], bL[j][1])\n                    w = min(tR[i][0], tR[j][0]) - max(bL[i][0], bL[j][0])\n                    \n                    sq = min(h, w) ** 2\n                    ans = max(ans, sq)\n                \n#                \n            \n        return ans\n```
['Python3']