Graph Implementations Preparation
Overview
There are many problems that can’t be represented and solved using the linear or tree structures that we’ve seen so far. To tackle these problems, we need a more general structure that allows us to have nodes connected to any number of other nodes. This kind of structure is called a graph. Today we’ll be focused on the two main ways that we can implement a graph in programming.
Basic Learning Objectives
Before class, you should be able to:
- Explain what nodes and vertices (plural of vertex) are in a graph
- Explain the difference between an adjacency matrix and adjacency list
Advanced Learning Objectives
After class, you should be able to:
- Implement your own graph data structure
Reading
You should read the following:
- Runestone 7.2-7.6