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 a weighted graph?
Think about graphs with varying edge costs.
What does Dijkstra's Algorithm do?
Recall the fire spreading analogy.
What is the primary objective of Dijkstra's Algorithm?
Focus on the term 'shortest path'.
True or False: Dijkstra's Algorithm can handle graphs with negative edge weights.
Remember how weights work in the algorithm.
Given a graph with vertices A, B, C, and D, and edges with weights between them, find the shortest path from A to D using Dijkstra's algorithm.
Don't forget to update the neighbors' costs after visiting a vertex.
Explain why Dijkstra's algorithm fails with negatively weighted edges, and provide an example.
Consider paths that could 'get shorter' after visiting them.
4 more questions in this section. Enroll free to practise them all.
Enroll free