Java 90% faster With comments
\nclass Solution {\n    public int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n        // Max Difference between any two horizontal cuts 
```\nclass Solution {\n    public int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n        // Max Difference between any two horizontal cuts * Max Difference between any two vertical cuts will give the answer\n        Arrays.sort(horizontalCuts); // to get consecutive cuts\n        Arrays.sort(verticalCuts);\n        long mod = (long)1e9+7;\n        long a = 0,b = 0; // a = max diff of horizontal cuts b = max diff of vertical cuts\n        int prev =0; // two edges of cake (0 - first cut)\n        a = Math.max(a,h-horizontalCuts[horizontalCuts.length-1]); // and (edge - last cut) of the cake\n        b = Math.max(b,w-verticalCuts[verticalCuts.length-1]);\n        for(int i:horizontalCuts){\n            a = Math.max(a,i-prev);\n            prev = i;\n        }\n        prev = 0;\n        for(int i:verticalCuts){\n            b = Math.max(b,i-prev);\n            prev = i;\n        }\n        return (int)((a*b)%mod);\n    }\n}\n```
['Java']