Function to merge and sort arrays
Question
Suppose you're given two lists, each unsorted. Write a function to take in the two lists, merge them, and then sort them in ascending order. You can call your function MergeSort()
.
Example:
Input: a = [6, 11, 8], b = [10, 34, 22]
Output: [6, 8, 10, 11, 22, 34]