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 is the maximum element in a max heap?
Where does the largest value always sit in a max heap?
What do we call the process of moving a node down to restore the heap?
Think about what term describes going downward in the structure.
Where is the maximum value located in a max heap?
Consider which node is at the top of the heap.
True or False: The height of a heap is linear with respect to the number of elements.
Reflect on the relationship between a complete tree structure and its height.
Given a max heap with elements [20, 15, 10, 8, 7, 3], describe the step-by-step process of removing the maximum and restoring the heap.
Take each child comparison step and consider swapping based on their values.
Construct a max heap from the following unsorted array: [5, 3, 8, 4, 1, 10]. Use bottom-up heapification to describe your steps.
Look at when the last non-leaf node starts fixing nodes above and the final height adjustments to maintain the structure.
4 more questions in this section. Enroll free to practise them all.
Enroll free