Coping with the Challenges
Graph for modeling the road network
To model the roads all around the world, we can use the concept of graphs as we have a network of roads. We will be using directed graphs so as to provide a solution that works on one-way roads too.
Let’s assume endpoints of a road or road junctions as vertices and the road connecting those vertices as an edge.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy