Easy to Understand (c++ solution)
\n# Code\n\nclass Solution {\npublic:\n    int maxArea(int h, int w, vector<int>& horizontalCuts, vector<int>& verticalCuts) {\n        sort(horizontalCuts.begi
\n# Code\n```\nclass Solution {\npublic:\n    int maxArea(int h, int w, vector<int>& horizontalCuts, vector<int>& verticalCuts) {\n        sort(horizontalCuts.begin(),horizontalCuts.end());\n        sort(verticalCuts.begin(),verticalCuts.end());\n        \n        long maxHightOfPiece = max(horizontalCuts[0], h - horizontalCuts[horizontalCuts.size() - 1]);\n        long maxWidthOfPiece = max(verticalCuts[0], w - verticalCuts[verticalCuts.size() - 1]);\n\n        for(int i=1;i<horizontalCuts.size();i++){\n             maxHightOfPiece = max(maxHightOfPiece, static_cast<long>(horizontalCuts[i] - horizontalCuts[i-1]));\n            }\n\n        for(int i=1;i<verticalCuts.size();i++){\n             maxWidthOfPiece = max(maxWidthOfPiece,static_cast<long>(verticalCuts[i] - verticalCuts[i-1]));\n            }\n        return (1LL*maxHightOfPiece*maxWidthOfPiece) % 1000000007;\n    }\n};\n```
['C++']