6. Connecting the dots — Big O and Graph Data Structure

Graph with vertices and edges

Types of Graphs

Storing Graphs

Adjacency Matrix

Adjacency Matrix for bidirectional graph with edges connected in both vertices
Adjacency matrix forming asymmetrical directed graph

Adjacency List

Adjacency list is stored as objects

Big O of Graph

Adding a vertex
Adding an Edge
Removing an an Edge
Removing a vertex

Resources:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store