Font size
WorksheetsHEAPS
Total questions: 10
Worksheet time: 5mins
It is a specialized tree-based data structure that satisfies the ____ property.
Priority Queues
Maps
Heaps
Sets
The key of a parent node is greater than or equal to the key of any of its children.
(a)
The key of a parent node is less than or equal to the key of any of its children.
(a)
What type of heap is this?
Max Heap
Min Heap
What type of heap is this?
Max Heap
Min Heap
In a Min Heap, every parent node is smaller than or equal to its (a) .
This function converts a regular list to a heap.
heapify()
tuple()
list()
dict()
In a Max Heap, every parent node is ____ than or equal to its children.
Less
Greater
To create a heap with initial values, use the ____ method of the Collections class.
createHeap()
initializeHeap()
addAll()
makeAll()
How do you determine the root node's value?
get()
peek()
insert()
traverse()
