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 primary purpose of Dijkstra’s algorithm?
Recall what type of problems requires the shortest distance.
What is a min-heap?
Think about how parent and child relationships work in trees.
What data structure does Dijkstra's Algorithm use for selecting the next vertex?
Consider which data structure allows for quick access to the smallest value.
Heap violations are fixed upwards when:
Think about the implications of increasing a node's value relative to it parent.
Using the graph defined by vertices 1-4 and edges (1-2, cost 4), (1-3, cost 1), (2-4, cost 1), (3-4, cost 5). Demonstrate the application of Dijkstra’s Algorithm starting from vertex 1.
Trace the path carefully, recording minimum distances achieved.
Describe the implications of using an array versus a heap for implementing Dijkstra’s algorithm in terms of time complexity and performance.
Compare the efficiency by considering retrieval of the minimum element.
5 more questions in this section. Enroll free to practise them all.
Enroll free