You are given two sorted integer arrays with an equal number of integers. Efficiently merge them, knowing that the first array has enough space allocated for the additional elements from the second array.

This is a bit like an insertion sort, but you start filling the end of the larger array from the integers in the two arrays, from largest to smallest. The integer from either array which is larger goes at the end, and integers are ‘stacked up’/inserted until all elements areĀ filled.