Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What defines a max heap?
Focus on parent-child relationships.
Describe the shape property of a heap.
Think about how nodes are structured.
What is the primary property of a max heap?
Think about the relationships between parent and child.
True or False: A max heap can have gaps between nodes?
Recall the definition of a complete binary tree.
Construct a max heap from the following sequence of integers: 10, 20, 5, 6, 1, 30.
Remember to 'bubble up' after each insertion as necessary.
Design an algorithm to delete the max element in a max heap and illustrate with an example.
Follow the process closely to maintain the heap.
5 more questions in this section. Enroll free to practise them all.
Enroll free