Heaps - Study Mode

[#146] How do you maintain the heap property after deleting the root node?
Correct Answer

(A) By performing a heapify operation.

[#147] Which data structure is commonly used to implement priority queues?
Correct Answer

(A) Heap

[#148] What is the height of a complete binary heap with n nodes?
Correct Answer

(A) ⌈log2(n + 1)⌉

[#149] What is the primary operation performed when adjusting a heap after insertion or deletion?
Correct Answer

(A) Heapify

[#150] In a binary heap, how is the parent node index calculated from a child node index i?
Correct Answer

(A) (i - 1) / 2