Beginner friendly Java/JavaScript/Python solutions
Time Compelxity : o(n*logn)\nJava\n\nclass Solution {\n    public int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n        Arrays.sort(hor
**Time Compelxity : o(n*logn)**\n**Java**\n```\nclass Solution {\n    public int maxArea(int h, int w, int[] horizontalCuts, int[] verticalCuts) {\n        Arrays.sort(horizontalCuts);\n        Arrays.sort(verticalCuts);\n        int max_hor_dis = Math.max(horizontalCuts[0], h - horizontalCuts[horizontalCuts.length-1]);\n        int max_ver_dis = Math.max(verticalCuts[0], w - verticalCuts[verticalCuts.length-1]);\n        int mod = (int)Math.pow(10,9)+7;\n        for(int i=1; i<horizontalCuts.length; i++){\n            max_hor_dis = Math.max(max_hor_dis, horizontalCuts[i] - horizontalCuts[i-1]);\n        }\n        for(int i=1; i<verticalCuts.length; i++){\n            max_ver_dis = Math.max(max_ver_dis, verticalCuts[i] - verticalCuts[i-1]);\n        }\n        return (int)((long) max_hor_dis * max_ver_dis % mod);\n    }\n}\n```\n**JavaScript**\n```\nvar maxArea = function(h, w, horizontalCuts, verticalCuts) {\n    horizontalCuts.sort((a,b) => a-b)\n    verticalCuts.sort((a,b) => a-b)\n    let max_hor_dis = Math.max(horizontalCuts[0], h - horizontalCuts[horizontalCuts.length-1])\n    let max_ver_dis = Math.max(verticalCuts[0], w - verticalCuts[verticalCuts.length-1])\n    for(let i=1; i<horizontalCuts.length; i++){\n        max_hor_dis = Math.max(max_hor_dis, horizontalCuts[i] - horizontalCuts[i-1])\n    }\n    for(let i=1; i<verticalCuts.length; i++){\n        max_ver_dis = Math.max(max_ver_dis, verticalCuts[i] - verticalCuts[i-1])\n    }\n    return BigInt(max_hor_dis) * BigInt(max_ver_dis) % BigInt(1e9+7)\n};\n```\n**Python**\n```\nclass Solution(object):\n    def maxArea(self, h, w, horizontalCuts, verticalCuts):\n        horizontalCuts.sort()\n        verticalCuts.sort()\n        max_hor_dis = max(horizontalCuts[0], h - horizontalCuts[-1])\n        max_ver_dis = max(verticalCuts[0], w - verticalCuts[-1])\n        for i in range(len(horizontalCuts)):\n            max_hor_dis = max(max_hor_dis, horizontalCuts[i] - horizontalCuts[i-1])\n        for i in range(len(verticalCuts)):\n            max_ver_dis = max(max_ver_dis, verticalCuts[i] - verticalCuts[i-1])\n        return max_hor_dis * max_ver_dis % int(1e9+7)\n```
['Python', 'Java', 'JavaScript']