13 Graphs: Learning how to model complex relationships in data

In this chapter

  • defining graphs
  • discussing the basic properties of graphs
  • evaluating graph implementation strategies: adjacency list and adjacency matrix
  • exploring graph traversal: breadth-first search and depth-first search

In our final chapter, we discuss another data structure that exceeds the characteristics of a container—graphs. They can be used to store elements, but that would be an understatement as graphs have a much broader range of applications.

This chapter defines what graphs are and discusses some of their most important properties. After covering the basics, we move on to their implementation. Finally, we briefly discuss two methods for traversing a graph.

What’s ...

Get Grokking Data Structures now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.