Java | Code is easy but getting to the code takes time
\n# Code\n\nclass Solution {\n    public long largestSquareArea(int[][] bottomLeft, int[][] topRight) {\n        long ans = 0;\n        for(int i=0;i<bottomLeft
\n# Code\n```\nclass Solution {\n    public long largestSquareArea(int[][] bottomLeft, int[][] topRight) {\n        long ans = 0;\n        for(int i=0;i<bottomLeft.length;i++) {\n            for(int j=i+1;j<bottomLeft.length;j++) {\n                int bx1 = bottomLeft[i][0];\n                int by1 = bottomLeft[i][1];\n                int bx2 = bottomLeft[j][0];\n                int by2 = bottomLeft[j][1];\n                int tx1 = topRight[i][0];\n                int ty1 = topRight[i][1];\n                int tx2 = topRight[j][0];\n                int ty2 = topRight[j][1];\n\n                int startx = Math.max(bx1, bx2);\n                int starty = Math.max(by1, by2);\n                int endx = Math.min(tx1, tx2);\n                int endy = Math.min(ty1, ty2);\n\n                int squaren = Math.min(endx-startx, endy-starty);\n                ans = squaren > 0 ? Math.max(ans, (long)squaren*squaren) : ans;\n           //     System.out.println("Comparing "+i+" "+j+" startx "+startx+" starty "+starty+" endx "+endx+" endy "+endy+" squaren "+squaren);\n            }\n        }\n        return ans;\n    }\n}\n```
['Java']