The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
149 views

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.

asked in Algorithms by Boss (26.8k points)
edited by | 149 views
0
What is head data structure??
0
It was a typo!!
0
By second approach will it not be O(nlogk)????
0
Yes.I mentioned in question itself:)

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
48,756 questions
52,850 answers
183,548 comments
68,742 users