🦄 C++ | Easy Code |
\nclass Solution {\npublic:\n    long long mod=1e9+7;\n    int maxArea(int h, int w, vector<int>& hc, vector<int>& vc) {\n        sort(hc.begin(),hc.end());\n  
```\nclass Solution {\npublic:\n    long long mod=1e9+7;\n    int maxArea(int h, int w, vector<int>& hc, vector<int>& vc) {\n        sort(hc.begin(),hc.end());\n        sort(vc.begin(),vc.end());\n        hc.push_back(h);\n        vc.push_back(w);\n        int  a,b;\n        a=hc[0];\n        b=vc[0];\n        for(int i=1;i<hc.size();++i){\n           a=max(a,hc[i]-hc[i-1]);\n        }\n        for(int i=1;i<vc.size();++i){\n           b=max(b,vc[i]-vc[i-1]);\n        }\n        \n        return (1LL*a*b)%mod;\n        \n        \n    }\n};\n```
['Array', 'C', 'Sorting']