Construct a weighted directed graph and perform Dijkstra's shortest path algorithm on it. Calculate the distance of each node from the starting vertex of the search.
We use cookies on our site for providing website functionality and for ad personalization. By clicking
"Agree to All" you consent to ALL the cookies we use. You can configure your cookie consent settings
under "Cookie settings" and you can always adjust your settings later under `Help > Privacy Policy`.
Cookie Settings
We store cookies in your browser to provide you with a better experience in our site and to help
us develop it further. You have the right to refuse consent to cookies that aren't strictly
necessary for the functioning of our site. The types of cookies we use are listed below.
Necessary cookies
Always Enabled
These cookies are necessary for the functioning of the various features on this site and will only
be set when you use said features. Consent is not required for setting those cookies.
Cookie
Details
consentGiven
Remembers your cookie consent settings
csrftoken
Protects against cross-site request forgery attacks
default-language
Allows you to set the language of the samples you want to see when browsing problems
default-tech
Allows you to set the technology of the samples you want to see when browsing problems
mixed
Chooses whether unverified categories are ordered by their set order, or after verified categories
sessionid
Tracks your login session
unverified-visible
Allows you to see unverified categories
Statistics cookies
These cookies allow us to gather anonymized statistics about where our visitors are from and how they use our site.
These cookies provide us with no personally identifying information.
These cookies are set by our advertising partners to track your interests and are used for the sole purpose of allowing our partners to provide more relevant ads for you.
They don't store any directly personal information and aren't used to identify you as a person, but will track your browser/device.