Merging and Sorting two sorted Arrays