Easy to understand N^2 solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n\n\n# Complexity\n- Time complexity:\nO(N^2)\n\n- Space complexity:\nO(1)
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n\n\n# Complexity\n- Time complexity:\nO(N^2)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    long long largestSquareArea(vector<vector<int>>& bottomLeft, vector<vector<int>>& topRight) {\n        long long maxArea = 0;\n        \n        \n        for (int i = 0; i < bottomLeft.size(); i++) {\n            for (int j = i + 1; j < bottomLeft.size(); j++) {\n                \n                if (bottomLeft[j][0] < topRight[i][0] && bottomLeft[j][1] < topRight[i][1] && bottomLeft[i][0] < topRight[j][0] && bottomLeft[i][1] < topRight[j][1]) {\n                    int x1 = max(bottomLeft[i][0], bottomLeft[j][0]);\n                    int y1 = max(bottomLeft[i][1], bottomLeft[j][1]);\n                    int x2 = min(topRight[i][0], topRight[j][0]);\n                    int y2 = min(topRight[i][1], topRight[j][1]);\n                \n                   long long int side = min(x2 - x1, y2 - y1);\n                \n                    maxArea = max(maxArea, side * side);\n                }\n            }\n        }\n        \n        return maxArea;\n    }\n};\n\n```
['C++']