Chapter 3. Graph problems

 

4.1. Building a graph framework

4.1.1. A concrete implementation of Edge

4.1.2. A concrete implementation of Graph

4.2. Finding the shortest path

4.2.1. Defining a path

4.2.2. Revisiting breadth-first search (BFS)

4.3. Minimizing the cost of building the network

4.3.1. Workings with weights

4.3.2. Finding the minimum spanning tree

Calculating the total weight of a weighted path

Jarnik’s algorithm

4.4. Finding shortest paths in a weighted graph

4.4.1. Dijkstra’s algorithm

4.5. Real-world applications

4.6. Exercises