Java clean cut logic, Faster than 98%
\n\n\n\tpublic int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n\t\t\tArrays.sort(horizontalCuts);\n\t\t\tArrays.sort(verticalCuts);\n\n  
\n\n\n\tpublic int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n\t\t\tArrays.sort(horizontalCuts);\n\t\t\tArrays.sort(verticalCuts);\n\n        long maxH = maxValue(horizontalCuts, h);\n        //System.out.println(maxH + " horiz max");\n        long maxV = maxValue(verticalCuts, w);\n        //System.out.println(maxV + " vert max");\n        int mod = (int)1e9 + 7;\n        long res1 = (int) (maxH % mod);\n        long res2 = (int) (maxV % mod);\n        int res = (int) (((long) res1 * res2) % mod);\n        \n        return res;\n    }\n\n    private static int maxValue(int[] arr, int edge){\n        if(arr.length == 0) return edge;\n        long maxVal = 0, value;\n        int i = 0;\n        if(arr.length == 1){\n            maxVal = Math.max(arr[0], edge - arr[0]);\n            return (int) maxVal;\n        }\n        maxVal = arr[0]; //starting with the left side \n        while (i<arr.length){\n            if(i == arr.length-1){\n                value = Math.abs(arr[i] - edge);\n                maxVal = Math.max(maxVal, value);\n                break;\n            }\n            value = Math.abs(arr[i] - arr[i+1]);\n            maxVal = Math.max(maxVal, value);\n            i++;\n        }\n        return (int)maxVal;\n    }\n\t\n\t//time complexity - O(n) as there is only one while loop in the maxValue() function\n\t//space complexity is constant, only extra variables have been utilized to solve the given problem
['Array', 'Greedy', 'Sorting', 'Java']