Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is a heap?
Remember the structure and purpose.
What does a Min-Heap guarantee about its parent and children?
Think about the smallest value in the tree.
What is the time complexity of inserting an element into a heap?
Think about how trees are structured.
True or False: A Max-Heap allows the parent node to be less than its children.
Consider how the elements compare in a Max-Heap.
You have the array [4, 10, 3, 5, 1]. Build a Min-Heap from this array and show the resulting array representation.
Try to construct the heap level by level while maintaining the properties.
Explain how the complexity of a sorted array compares to the performance of a heap for insertions and deletions.
Think about how elements are organized in both structures.
5 more questions in this section. Enroll free to practise them all.
Enroll free