c++ || Easy to Understand code || Using set and sorting
\nOne of the easiest method implementation is below-\nlets say horizontal array is [1,2,4] ans vertical array is [1,3] and h= 5 and w= 4 ;\nsteps:\n    1. move 
```\nOne of the easiest method implementation is below-\nlets say horizontal array is [1,2,4] ans vertical array is [1,3] and h= 5 and w= 4 ;\nsteps:\n    1. move both array into set;\n    2. check wether horizontal array have 0 or h in it , if no then push them in horizontal array;\n    3. check wether vertical array have 0 or w in it , if no then push them in vertical array;\n    4. sort both horizontal and vertical array;\n    5. after doing above steps our horizontal array [0,1,2,4,5] and vertical array[0,1,3,4];\n    6. now find find highest difference among the elements in both array eg: 2 and 2 for the above array;\n    7. multiply both to get result eg: 4 in the above array;\n\n\nclass Solution {\npublic:\n    int maxArea(int h, int w, vector<int>& hor, vector<int>& v) {\n        set<int> m1,m2;\n        for(auto x : hor) \n        {\n            m1.insert(x) ;\n        }\n        for(auto y : v) \n        {\n            m2.insert(y) ;\n        }\n        if(m1.find(h) == m1.end()) \n        {\n            hor.push_back(h);\n        }\n        if(m1.find(0) ==m1.end() )\n        {\n            hor.push_back(0);\n        }\n        if(m2.find(w) == m2.end()) \n        {\n            v.push_back(w);\n        }\n        if(m2.find(0) == m2.end()) \n        {\n            v.push_back(0);\n        }\n        sort(hor.begin(), hor.end());\n        sort(v.begin(), v.end());\n        \n        int maxihor = 0;\n        int maxiv = 0;\n        for(int i = 1; i< hor.size(); i++)\n        {\n            maxihor = max(maxihor, hor[i]-hor[i-1]);\n        }\n        \n        for(int j = 1; j< v.size(); j++)\n        {\n            maxiv = max(maxiv, v[j]-v[j-1]);\n        }\n        \n        int ans = ((long long ) maxiv * maxihor)  % 1000000007;\n        return ans;\n    }\n};\n```
['Sorting']