Data Structures19 sections · 729 units
Open in CourseQuiz: Heap Basics
Time complexity
Check Your Understanding
What is the time complexity of finding (not removing) the minimum element in a min-heap?
- A.O(1) - it's always at the root
- B.O(n) - need to search all elements
- C.O(log n) - need to traverse the tree
- D.O(n log n) - need to sort first