Pergunta de entrevista da empresa IBM

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