AIRA MATRIX interview question

Merge two sorted array upto a given number of elements for both the array