Daily LeetCode || July-2
\n\n\nclass Solution {\npublic:\n    int maxArea(int h, int w, vector<int>& horizontalCuts, vector<int>& verticalCuts) {\n        horizontalCuts.push_back(h);\n
\n\n```\nclass Solution {\npublic:\n    int maxArea(int h, int w, vector<int>& horizontalCuts, vector<int>& verticalCuts) {\n        horizontalCuts.push_back(h);\n        verticalCuts.push_back(w);\n        sort(horizontalCuts.begin(),horizontalCuts.end());\n        sort(verticalCuts.begin(),verticalCuts.end());\n        long long int len = horizontalCuts[0];\n        long long int val;\n        long long int wid = verticalCuts[0];\n        int n = horizontalCuts.size();\n        int m = verticalCuts.size();\n        for(int i = 0;i<n-1;i++)\n        {\n            val = horizontalCuts[i+1]-horizontalCuts[i];\n            len = max(len,val);\n        }       \n        for(int i = 0;i<m-1;i++)\n        {\n            val = verticalCuts[i+1]-verticalCuts[i];\n            wid = max(wid,val);\n        }\n        int ans = ((len%1000000007)*(wid%1000000007))%1000000007;\n        return ans;\n    }\n};\n```
['Greedy', 'Sorting']