simple code/ Easy to understand [Java]
class Solution {\n    public int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n        \n        \n        Arrays.sort(horizontalCuts);\n  
class Solution {\n    public int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n        \n        \n        Arrays.sort(horizontalCuts);\n        Arrays.sort(verticalCuts);\n        \n        int r = horizontalCuts.length;\n        int c = verticalCuts.length;\n        long mod = (long)1e9+7;\n        \n        long row = 0;\n        int prev1 = 0;\n         row = Math.max(row, h - horizontalCuts[r-1]);\n        \n        for(int i=0; i<r; i++)\n        {\n            row = Math.max(row, horizontalCuts[i] - prev1);\n            prev1 = horizontalCuts[i];\n        }\n        \n        long col = 0;\n        int prev2 = 0;\n         col = Math.max(col, w - verticalCuts[c-1]);\n        \n        for(int i=0; i<c; i++)\n        {\n            col = Math.max(col, verticalCuts[i] - prev2);\n            prev2 = verticalCuts[i];\n        }\n        \n        return (int)((row*col)%mod);\n    }\n}
[]