N way Merge Algorithm(extension of merge sort)