Merging k sorted lists of size n/k into one sorted list of n-elements using heap sort will take how much time ?
First approach:- here it is mentioned heap sort so, heap sort will always take nlogn.and here also we have n elements and it will take nlogn.
But other method is to use heap data structure of size k and merge,it will give o(k)+(logk)*(n/k)
I think answer should be nlogn only because the second approach is not heap sort.
I think here only merging is asked here that means asking for time required for Bulid Heap so time required O(n/k *k)=O(n)