> For the complete documentation index, see [llms.txt](https://mr-poston-1.gitbook.io/c++/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mr-poston-1.gitbook.io/c++/7.-pointers-linked-lists-and-graphs/7.3-graphs/7.3.1-graphs.md).

# 7.3.1 Graphs

Graphs are a more flexible, abstract data structure that can be used for many different applications. They are similar to linked lists in that they both use nodes. While a linked list connects nodes in a sequence, graphs connect nodes in any order and can have any number of connections.

With any number of nodes and no restrictions on connections, graphs can be very useful for applications such as:

**Airline Routes:**\
![Airline routes](https://codehs.com/uploads/709ca9e2bc4a4963e8e33847f1f90faf)\
*Source:By Cassiopeia sweet at Japanese Wikipedia - Based on 2000px-US\_Locator\_Blank2.svg.png（File:US Locator Blank2.svg）, CC BY-SA 3.0,* [*https://commons.wikimedia.org/w/index.php?curid=14981047*](https://commons.wikimedia.org/w/index.php?curid=14981047)

**Flow Charts:**\
![Airline routes](https://codehs.com/uploads/df6554d65c9ed01f134ac0a2df84a43e)\
*Source: By svg by Booyabazookaoriginal png by Wapcaplet - vector version of Image:LampFlowchart.png, CC BY-SA 3.0,* [*https://commons.wikimedia.org/w/index.php?curid=714537*](https://commons.wikimedia.org/w/index.php?curid=714537)

**Social Networks:**\
![Airline routes](https://codehs.com/uploads/4de83815f0e07b96c3fe564dc2bb174e)\
*Source: By Martin Grandjean - Own work, CC BY-SA 4.0,* [*https://commons.wikimedia.org/w/index.php?curid=39967994*](https://commons.wikimedia.org/w/index.php?curid=39967994)

Graphs can get very complex to implement and use. In this lesson, you are going to explore the basic application of graphs and how they can be used.
