Monthly Archives: May 2018

Data Structures and Algorithms in Python – Graphs

Graph Implementation – Adjacency list We’ve used dictionaries to implement the adjacency list in Python which is the easiest way. To implement Graph ADT we’ll create two classes, Graph, which holds the master list of vertices, and Vertex, which will represent each vertex in the graph. Each Vertex uses a dictionary to keep track of… Read More »