IBM interview question

The first question was basically a merge sort, and the second was a subarray