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 time complexity do heaps allow for insertions?
Think about the structure of a heap.
In a max-heap, how must the values relate between parent and child nodes?
Consider how heaps are structured.
What is the primary property of a max-heap?
Visualize a heap.
Dijkstra’s Algorithm requires how long to update the values in a heap?
Consider the time complexities related to heaps.
Given a min-heap with the values [4, 10, 8, 20, 15], what is the structure of this heap after deleting the minimum value? Illustrate the heaps before and after the deletion.
Always replace the root with a leaf and rebalance.
Consider a situation in Dijkstra’s algorithm where you need to update a vertex's distance. Describe the steps required to identify and adjust the heap accordingly.
It's about tracking where the changes need to occur.
4 more questions in this section. Enroll free to practise them all.
Enroll free