☑️✅Easy Java Solution || Beats 100%✅☑️
PLEASE UPVOTE IF IT HELPED\n\n---\n\n# Complexity\n- Time complexity:O(n^2)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(1)\n Add your sp
# **PLEASE UPVOTE IF IT HELPED**\n\n---\n\n# Complexity\n- Time complexity:$$O(n^2)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public long largestSquareArea(int[][] left, int[][] right){\n        int n=left.length;\n        long ans=0;\n        for(int i=0;i<n;i++){\n            for(int j=i+1;j<n;j++){\n                int a=Math.max(left[i][0],left[j][0]);\n                int b=Math.max(left[i][1],left[j][1]);\n                int c=Math.min(right[i][0],right[j][0]);\n                int d=Math.min(right[i][1],right[j][1]);\n                if(a<c && b<d){\n                long side=Math.min((c-a),(d-b));\n                ans=Math.max(ans,side*side);\n                }\n            }\n        }\n        return ans;\n    }\n}\n```
['Java']