Merging K number of N size sorted arrays to one sorted array