My Easy C++ Code with comments
```\nclass Solution {\npublic:\n    int n,m;\n    vectorgreatest(vectornums, int k)\n    {\n        int leave=nums.size()-k;\n        vectorgreat;\n        for(
```\nclass Solution {\npublic:\n    int n,m;\n    vector<int>greatest(vector<int>nums, int k)\n    {\n        int leave=nums.size()-k;\n        vector<int>great;\n        for(auto i : nums)\n        {\n           while(leave && great.size() && great.back()<i)\n           {\n              great.pop_back();\n               leave--;\n           }\n           great.push_back(i); \n        }\n        great.resize(k);\n        return great;\n    }\n    bool check(vector<int>nums1, int i, vector<int>nums2, int j)\n    {\n        while(i<nums1.size() && j<nums2.size() && nums1[i]==nums2[j])\n        {\n            i++;\n            j++;\n        }\n        if(j==nums2.size()) return true;\n        if(i<nums1.size() && nums1[i]>nums2[j]) return true;\n        return false;\n    }\n    // merge the 2 big numbers we have got in 2 vectors into 1 big possible number of size k \n    vector<int> merge(vector<int>nums1 , vector<int>nums2,int k)\n    {\n        int i=0,j=0;\n        vector<int>great(k,0);\n        for(int l=0;l<k;l++)\n        {\n            great[l]=check(nums1,i,nums2,j)?nums1[i++]:nums2[j++];\n        }\n        return great;\n    }\n    vector<int> maxNumber(vector<int>& nums1, vector<int>& nums2, int k) {\n        n=nums1.size();\n        m=nums2.size();\n        vector<int>res;\n        for(int i=max(0,k-m);i<=min(k,n);i++)\n        {\n            //v1 = greatest possible number stored in vector of length i\n            //v2 = greatest possible number stored in vector of length k-i;\n            auto v1 =greatest(nums1,i);\n            auto v2=greatest(nums2,k-i);\n            auto candidate=merge(v1,v2,k);\n            if(check(candidate,0,res,0))\n                res=candidate;\n        }\n        return res;\n    }\n};\n````
[]