✅ Java Solution | Easy to understand
Code\nJava []\npublic long largestSquareArea(int[][] bottomLeft, int[][] topRight) {\n\tint n = bottomLeft.length, ans = 0;\n\n\tfor(int i=0; i<n; i++){\n\t\tfo
# Code\n```Java []\npublic long largestSquareArea(int[][] bottomLeft, int[][] topRight) {\n\tint n = bottomLeft.length, ans = 0;\n\n\tfor(int i=0; i<n; i++){\n\t\tfor(int j=i+1; j<n; j++){\n\t\t\tint[] startpoint = new int[2];\n\t\t\tstartpoint[0] = Math.max(bottomLeft[i][0], bottomLeft[j][0]);\n\t\t\tstartpoint[1] = Math.max(bottomLeft[i][1], bottomLeft[j][1]);\n\n\t\t\tint[] endpoint = new int[2];\n\t\t\tendpoint[0] = Math.min(topRight[i][0], topRight[j][0]);\n\t\t\tendpoint[1] = Math.min(topRight[i][1], topRight[j][1]);\n\n\t\t\tif(endpoint[0] > startpoint[0] && endpoint[1] > startpoint[1]) {\n\t\t\t\tint diff1 = endpoint[0]-startpoint[0];\n\t\t\t\tint diff2 = endpoint[1]-startpoint[1];\n\n\t\t\t\tint min = Math.min(diff1 , diff2);\n\t\t\t\tans = Math.max(min, ans);\n\t\t\t}\n\n\t\t}\n\t}\n\n\treturn ans*1l*ans;\n}\n```
['Java']