Understanding single source shortest path problem


The single source shortest path problem is the most common problem that can be modeled as a graph. To understand the problem better, let's look at an example of how we face it and why we require an efficient solution.

Emergency Services

Consider a fire breaking out in a house, and the residents called the emergency services. The emergency services would need to quickly locate the closest fire station that is not busy with something else. For this, they need to know the shortest distance from the house under fire to all the stations. This is because the closest one may be busy, so they would have to fall back to the second closest one, which may also be busy. And so, they would need the shortest distance to all the fire stations so that they can call the one that is closest and not busy.

Liking the course? Check our discounted plans to continue learning.