Python Solution | Greedy Search + Dynamic Programming
```\nclass Solution:\n    def maxNumber(self, nums1: List[int], nums2: List[int], k: int) -> List[int]:        \n        def merge(n1, n2):\n            res = [
```\nclass Solution:\n    def maxNumber(self, nums1: List[int], nums2: List[int], k: int) -> List[int]:        \n        def merge(n1, n2):\n            res = []\n            while (n1 or n2) :\n                if n1>n2:\n                    res.append(n1[0])\n                    n1 = n1[1:]\n                else:\n                    res.append(n2[0])\n                    n2 = n2[1:]\n            return res\n        \n        def findmax(nums, length):\n            l = []\n            maxpop = len(nums)-length\n            for i in range(len(nums)):\n                while maxpop>0 and len(l) and nums[i]>l[-1]:\n                    l.pop()\n                    maxpop -= 1\n                l.append(nums[i])\n            return l[:length]\n        \n        n1 = len(nums1)\n        n2 = len(nums2)\n        res = [0]*k\n        for i in range(k+1):\n            j = k-i\n            if i>n1 or j>n2:    continue\n            l1 = findmax(nums1, i)\n            l2 = findmax(nums2, j)\n            res = max(res, merge(l1,l2))\n        return res
['Dynamic Programming', 'Greedy', 'Python', 'Python3']