There are towns in the city of Algoria, but only of them have fire stations. Due to the fact that the weather is hot and windy, fires spread quickly, therefore it is crucial for firefighters to arrive as fast as possible. That is why Bob, a road engineer, must determine the distance of each town from the nearest fire station.
What type of algorithms should Bob use to perform this fundamental task?