Question DSA-HEAP-0013
MediumWhat is the time complexity of finding the k largest elements of n using a min-heap of size k?
- A.
O(n log n)
- B.
O(k log n)
- 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 finding the k largest elements of n using a min-heap of size k?
O(n log n)
O(k log n)
Sign up free to see the answer and a step-by-step explanation.
O(n²)
O(n log k)