💥Memory beats 100.00%, Runtime beats 50.00% [EXPLAINED]
Intuition\nThe intuition ensures that each subsequence is maximized independently and then combined optimally to form the largest number.\n\n# Approach\nHelper 
# Intuition\nThe intuition ensures that each subsequence is maximized independently and then combined optimally to form the largest number.\n\n# Approach\nHelper Function for Maximum Number from Single Array: Define a function to get the maximum number of length length from a single array while preserving the order.\n\nMerge Function: Define a function to merge two arrays to form the maximum number by selecting the greatest number from the two at each step.\n\nMain Function: Iterate over all possible splits of k between the two arrays, use the helper function to get the maximum subsequence from each array for each split, and then merge them to get the maximum result.\n\n# Complexity\n- Time complexity:\nO(m+n)\n\n- Space complexity:\nO(k), due to storing intermediate results.\n\n# Code\n```typescript []\nfunction maxNumber(nums1: number[], nums2: number[], k: number): number[] {\n    const getMaxSubsequence = (nums: number[], length: number): number[] => {\n        const stack: number[] = [];\n        let drop = nums.length - length; // Use \'let\' here to allow reassignment\n        for (const num of nums) {\n            while (drop && stack.length && stack[stack.length - 1] < num) {\n                stack.pop();\n                drop--;\n            }\n            stack.push(num);\n        }\n        return stack.slice(0, length);\n    };\n\n    const merge = (nums1: number[], nums2: number[]): number[] => {\n        const result: number[] = [];\n        while (nums1.length || nums2.length) {\n            if (compare(nums1, nums2) > 0) {\n                result.push(nums1.shift()!);\n            } else {\n                result.push(nums2.shift()!);\n            }\n        }\n        return result;\n    };\n\n    const compare = (a: number[], b: number[]): number => {\n        for (let i = 0; i < Math.min(a.length, b.length); i++) {\n            if (a[i] !== b[i]) return a[i] - b[i];\n        }\n        return a.length - b.length;\n    };\n\n    let maxResult: number[] = [];\n    for (let i = Math.max(0, k - nums2.length); i <= Math.min(k, nums1.length); i++) {\n        const subseq1 = getMaxSubsequence(nums1, i);\n        const subseq2 = getMaxSubsequence(nums2, k - i);\n        const candidate = merge(subseq1, subseq2);\n        if (compare(candidate, maxResult) > 0) maxResult = candidate;\n    }\n\n    return maxResult;\n}\n\n```
['TypeScript']