Data Structures19 sections · 729 units
Open in Course

Quiz: Heap Basics

Time complexity

Check Your Understanding

What is the time complexity of finding (not removing) the minimum element in a min-heap?

  1. A.O(1) - it's always at the root
  2. B.O(n) - need to search all elements
  3. C.O(log n) - need to traverse the tree
  4. D.O(n log n) - need to sort first
Start the roadmap to answer the quizzes and solve the challenges