getMaxNumber
that uses a monotonic stack to find the maximum number of a certain length from a single array.merge
to merge two arrays into the largest number possible.i
that can be taken from nums1
.
i
, calculate the maximum number from nums1
of length i
and from nums2
of length k-i
.