Question DSA-HEAP-0067
HardHow many comparisons does building a heap bottom-up take in the worst case, in big-O terms?
- A.
O(log n)
- B.
O(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
How many comparisons does building a heap bottom-up take in the worst case, in big-O terms?
O(log n)
O(n)
Sign up free to see the answer and a step-by-step explanation.
O(n log n)
O(n²)