javascript maximum gap in height and width
Follow the comments\n\nvar maxArea = function(h, w, horizontalCuts, verticalCuts) {\n\t//sort horizontal and vertical cuts\n    horizontalCuts.sort(function(a,b
Follow the comments\n```\nvar maxArea = function(h, w, horizontalCuts, verticalCuts) {\n\t//sort horizontal and vertical cuts\n    horizontalCuts.sort(function(a,b){return a-b});\n    verticalCuts.sort(function(a,b){return a-b});\n\t//add 0 and h to horizontal cuts\n    horizontalCuts.unshift(0);\n    horizontalCuts.push(h);\n\t//add 0 and w to vertical cuts\n    verticalCuts.unshift(0);\n    verticalCuts.push(w);\n    var maxw =0, maxh=0;\n\t//find max gap in width and height\n    for(var i=1;i<verticalCuts.length;i++){\n        maxw = Math.max(verticalCuts[i]-verticalCuts[i-1],maxw);\n    }\n    for(var i=1;i<horizontalCuts.length;i++){\n        maxh = Math.max(horizontalCuts[i]-horizontalCuts[i-1],maxh);\n    }\n\t//return the mod of product \n    return (maxw*maxh)%1000000007 \n};\n```
['JavaScript']