Abstract
Many programming problems can be solved by considering the situation as a graph and using an appropriate graph algorithm. In this chapter, we will learn the basics of graphs and a selection of important graph algorithms.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
In some older compilers, the function make_tuple must be used instead of the braces (for example, make_tuple(1,2,5) instead of {1,2,5}).
- 2.
Of course, we could also declare the priority queue as in Sect. 5.2.3 and use positive distances, but the implementation would be longer.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Laaksonen, A. (2020). Graph Algorithms. In: Guide to Competitive Programming. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-030-39357-1_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-39357-1_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-39356-4
Online ISBN: 978-3-030-39357-1
eBook Packages: Computer ScienceComputer Science (R0)