Heaps - Study Mode
[#51] Which of the following operations is not directly supported by a binary heap?
Correct Answer
(A) Searching for an arbitrary element
[#52] In a binary heap represented as an array, what is the index of the left child of the node at index i?
Correct Answer
(A) 2 * i + 1
[#53] What is the space complexity of a binary heap when stored in an array?
Correct Answer
(C) O(n)
[#54] Which operation involves moving a node to maintain the heap property after insertion in a binary heap?
Correct Answer
(A) Bubble-up or Percolate-up
[#55] In a max-heap, what is the time complexity to find the second largest element?
Correct Answer
(B) O(log n)