Question DSA-HEAP-0051
MediumWhat is the time complexity of merging k sorted lists with a total of n elements using a min-heap?
- A.
O(n log k)
- B.
O(n log n) always
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Heaps and Priority Queues question
What is the time complexity of merging k sorted lists with a total of n elements using a min-heap?
O(n log k)
O(n log n) always
Sign up free to see the answer and a step-by-step explanation.
O(nk)
O(k log n)