Heaps - Study Mode
[#41] In a binary heap, how do you locate the right child of a node at index i?
Correct Answer
(A) 2 * i + 2
[#42] Which property is common to both max-heaps and min-heaps?
Correct Answer
(A) They both maintain a complete binary tree.
[#43] What is the typical time complexity of decreasing a key in a min-heap?
Correct Answer
(B) O(log n)
[#44] How is the structure of a binary heap affected when you increase the size of the heap?
Correct Answer
(A) The heap grows by adding nodes to the end.
[#45] In a binary heap stored as an array, what is the index of the parent node for the node at index i?
Correct Answer
(A) (i - 1) / 2