BASIC Approach in which we first we are calculating intersection coordinates for calculating maxarea
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach      if(minx<maxx&&miny<maxy)\ni am using this to ensure that if bottom le
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach      if(minx<maxx&&miny<maxy)\ni am using this to ensure that if bottom left coordinates x must be of bottomleft less than topright x corrdinates and same for y coordinates then the area intersection is possible hope you understand.\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n^2)\n<!-- O(n^2)-->\n\n- Space complexity:O(1)\n<! -- -->\n\n# Code\n```\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& bottomleft, vector<vector<int>>& topright) {\n        long long area=0;\n      int n=bottomleft.size();\n        for(int i=0;i<n;i++)\n         {\n             for(int j=i+1;j<n;j++)\n              {\n                  long long minx=max(bottomleft[i][0],bottomleft[j][0]);\n                  long long miny=max(bottomleft[i][1],bottomleft[j][1]);\n                  long long maxx=min(topright[i][0],topright[j][0]);\n                long long maxy=min(topright[i][1],topright[j][1]);\n                  if(minx<maxx&&miny<maxy)\n                   {\n                       long long side=min(maxx-minx,maxy-miny);\n                        area=max(area,side*side);\n                   }\n              }\n         }\n         return area;\n        \n    }\n};\n```
['C++']