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 costs like distances or prices.
What function assigns weights to edges in a graph?
What do we call the function that gives meaning to edge costs?
What is a weighted graph?
Think about graphs that are used in real-life situations.
True or False: BFS can always find the shortest path in a weighted graph.
Recall the limitations of BFS with regards to edge weights.
Model a simple graph with at least 5 vertices and varying edge weights, and apply Dijkstra’s algorithm. What would the shortest paths from a source vertex look like?
Sketch the graph out and label the weights before starting the algorithm.
Design a scenario where you compare single-source shortest paths to all pairs shortest paths in a real-world context. Discuss implications in decision-making.
Think about how each situation might change based on the approach taken.
5 more questions in this section. Enroll free to practise them all.
Enroll free