What is head data structure??

0 votes

**Merging k sorted lists of size n/k into one sorted list of n-elements using heap sort will take how much time ?**

My doubt

**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.

Please check.