Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is a heap?
Think about how it relates to priorities.
Describe the shape property of a heap.
How do we add elements?
What is the main operation to retrieve the highest priority job in a max heap?
Think about the name of the operation.
True or False: In a max heap, child nodes can have values greater than their parent node.
Consider the definition of max heaps.
Given the following elements, insert them into a max heap: 20, 15, 30, 25, 10, 5. Show the steps, including any necessary adjustments.
Remember to bubble up when the max heap property is violated.
Explain why a completely filled binary tree with violations cannot function as a max heap, using an example.
What does the max heap definition tell you?
6 more questions in this section. Enroll free to practise them all.
Enroll free