JAVA Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int[] maxNumber(int[] nums1, int[] nums2, int k) {\n        int m = nums1.length;\n        int n = nums2.length;\n        int[] maxNumber = new int[k];\n        \n        for (int i = Math.max(0, k - n); i <= k && i <= m; i++) {\n            int[] candidate = merge(maxArray(nums1, i), maxArray(nums2, k - i), k);\n            if (greater(candidate, 0, maxNumber, 0)) {\n                maxNumber = candidate;\n            }\n        }\n        \n        return maxNumber;\n    }\n    \n    private int[] maxArray(int[] nums, int k) {\n        int[] result = new int[k];\n        int len = 0;\n        for (int i = 0; i < nums.length; i++) {\n            while (len > 0 && len + nums.length - i > k && nums[i] > result[len - 1]) {\n                len--;\n            }\n            if (len < k) {\n                result[len++] = nums[i];\n            }\n        }\n        return result;\n    }\n    \n    private int[] merge(int[] nums1, int[] nums2, int k) {\n        int[] result = new int[k];\n        int i = 0, j = 0;\n        for (int r = 0; r < k; r++) {\n            if (greater(nums1, i, nums2, j)) {\n                result[r] = nums1[i++];\n            } else {\n                result[r] = nums2[j++];\n            }\n        }\n        return result;\n    }\n    \n    private boolean greater(int[] nums1, int i, int[] nums2, int j) {\n        while (i < nums1.length && j < nums2.length && nums1[i] == nums2[j]) {\n            i++;\n            j++;\n        }\n        return j == nums2.length || (i < nums1.length && nums1[i] > nums2[j]);\n    }\n    }\n\n```
['Java']