Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 795 Bytes

File metadata and controls

13 lines (11 loc) · 795 Bytes

Graph-Implementation

Undirected Graph

A class to implement an undirected graph. Vertices and their connected vertices are stored using an adjacency list in the form of a dictionary. The class contains methods for adding and removing edges and vertexes, checking the graph for valid paths, connected components, cycles, and performs depth-first searches and breadth-first searches.

Directed Graph

A class to implement a directed graph. Vertices and their connected vertices are stored using an adjacency matrix in the form of a list. The class contains methods for adding and removing edges and vertexes, checking the graph for valid paths, cycles, performs depth-first searches and breadth-first, and performs Dijkstra's Algorithm to find the shortest cost/distance path in the graph.