Solution: Merge Sorted Array
Let's solve the Merge Sorted Array problem using the K-way Merge pattern.
Statement
Given two sorted integer arrays, and , and the number of data elements in each array, and , implement a function that merges the second array into the first one. You have to modify in place.
Note: Assume that has a size equal to , meaning it has enough space to hold additional elements from .
Constraints:
nums1.length