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 complexity for inserting an element into a heap?
Think about the levels you need to traverse.
In a max heap, which node is the largest?
Consider the properties of a max heap.
What is the maximum height of a heap with n elements?
Remember how the tree structure expands.
True or False: In a min heap, the maximum value is always found at the root.
Reflect on the properties of min vs max heaps.
Given a randomly ordered array of ten numbers, describe and illustrate how you would transform it into a max heap using the bottom-up method.
Focus on how each subtree adheres to the max heap property while going up.
If you start with a max heap of size n and repeatedly remove elements, how does the structure change?
Visualize how nodes maintain balance and fill gaps after each removal.
5 more questions in this section. Enroll free to practise them all.
Enroll free