CPP || Easy- to - understand || greedy
\nclass Solution {\npublic:\n    int maxArea(int h, int w, vector<int>& hor, vector<int>& ver) {\n        long long mod = 1000000007;\n        hor.push_back(0);
```\nclass Solution {\npublic:\n    int maxArea(int h, int w, vector<int>& hor, vector<int>& ver) {\n        long long mod = 1000000007;\n        hor.push_back(0);\n        hor.push_back(h%mod);\n        ver.push_back(0);\n        ver.push_back(w%mod);\n        \n        sort(hor.begin(),hor.end());\n        sort(ver.begin(),ver.end());\n        \n        int hdiff=0;\n        int vdiff =0;\n        for(int i=0;i<hor.size()-1;i++){\n            int a = ((hor[i+1]%mod)-(hor[i]%mod))%mod;\n            hdiff= max(hdiff,a);\n        }\n\n        for(int i=0;i<ver.size()-1;i++){\n\n            int a = ((ver[i+1]%mod)-(ver[i]%mod))%mod;\n            vdiff = max(vdiff,a);\n        }\n        \n        \n        int ans = (hdiff%mod)*(vdiff%mod)%mod;\n        \n        return ans;\n    }\n};\n```
['Greedy', 'C', 'Sorting', 'C++']