You are given two integer arrays a and b, each sorted in non-decreasing order.
Return a single array containing all elements of a and b, in non-decreasing order. Duplicates are kept, so the result has exactly a.length + b.length elements.
Input: a = [1, 3, 5, 7], b = [2, 4, 6, 8]
Output: [1, 2, 3, 4, 5, 6, 7, 8]
Explanation: The elements of the two arrays interleave perfectly.
Input: a = [2, 2, 4], b = [1, 2, 9]
Output: [1, 2, 2, 2, 4, 9]
Explanation: All three 2s appear in the result.
a.length, b.length ≤104a[i], b[i] ≤109a and b are each sorted in non-decreasing order.