Go divide and conquer
\nfunc maxNumber(nums1 []int, nums2 []int, k int) []int {\n    res := make([]int, k)\n    for i := 0; i <= k; i++ {\n        if len(nums1) >= i && len(nums2) >=
```\nfunc maxNumber(nums1 []int, nums2 []int, k int) []int {\n    res := make([]int, k)\n    for i := 0; i <= k; i++ {\n        if len(nums1) >= i && len(nums2) >= k - i {\n            res1 := getMax(nums1, i)\n            res2 := getMax(nums2, k - i)\n            temp := merge(res1, res2)\n            if isLarger(temp, res) {\n                res = temp\n            }\n        }\n    }\n    return res\n}\n\nfunc getMax(nums []int, k int) []int {\n    discard := len(nums) - k\n    var stack []int\n    for i := 0; i < len(nums); i++ {\n        for len(stack) > 0 && discard > 0 && stack[len(stack) - 1] < nums[i] {\n            stack = stack[:len(stack) - 1]\n            discard--\n        }\n        stack = append(stack, nums[i])\n    }\n    return stack[:k]\n}\n\nfunc merge(a []int, b []int) []int {\n    var res []int\n    for len(a) > 0 && len(b) > 0 {\n        if isLarger(a, b) {\n            res = append(res, a[0])\n            a = a[1:]\n        } else {\n            res = append(res, b[0])\n            b = b[1:]\n        }\n    }\n    \n    if len(a) > 0 {\n        res = append(res, a...)\n    }\n    \n    if len(b) > 0 {\n        res = append(res, b...)\n    }\n    \n    return res\n}\n\nfunc isLarger(a []int, b []int) bool {\n    l := min(len(a), len(b))\n    for i := 0; i < l; i++ {\n        if a[i] < b[i] {\n            return false\n        } else if a[i] > b[i] {\n            return true\n        }\n    }\n    return len(a) > len(b)\n}\n\nfunc min(a int, b int) int {\n    if a < b {\n        return a\n    }\n    return b\n}\n```
[]