C++ || Max cake piece area || 100% Correct with 98 ms Runtime|| beats 58% C++ submission
Code:\n\nclass Solution {\npublic:\n    int maxArea(long long h, long long w, vector<int>& horizontalCuts, vector<int>& verticalCuts) {\n       \n        long l
# **Code:**\n```\nclass Solution {\npublic:\n    int maxArea(long long h, long long w, vector<int>& horizontalCuts, vector<int>& verticalCuts) {\n       \n        long long hd=0,vd=0;\n        int MOD = 1e9 + 7;\n        \n        sort(horizontalCuts.begin(),horizontalCuts.end());\n        sort(verticalCuts.begin(),verticalCuts.end());\n        \n         long long  maxH=horizontalCuts[0];\n        long long maxV=verticalCuts[0];\n        \n        for(int i=0;i<horizontalCuts.size()-1;i++){\n            hd=horizontalCuts[i+1]-horizontalCuts[i];\n           maxH =max(maxH,hd);\n}\n        for(int i=0;i<verticalCuts.size()-1;i++){\n            vd = verticalCuts[i+1]-verticalCuts[i];\n            maxV= max(maxV,vd);\n        }\n        \n        maxV= max(maxV,w-verticalCuts[verticalCuts.size()-1]);\n        maxH = max(maxH,h-horizontalCuts[horizontalCuts.size()-1]);\n        \n        long long result = (maxH%MOD)*(maxV%MOD);\n        return result%MOD;\n    }\n};\n```\n\n![image](https://assets.leetcode.com/users/images/fbb11b31-0dbf-4046-87ed-79ac819091ef_1656776763.3670876.png)\n\n
['C', 'Sorting']