Graph Algorithms
This repository contains graph algorithms in C++.
Algorithms:
- To find all paths between 2 vertices
- Ford Fulkerson Algorithm
- To find k cores (Connected components after all vertices with degree less than k have been removed)
- To find the k numbers that occur the most frequently in a vector
- Kruskal's algorithm
- To find the (a) mother vertex
- To find path length greater than k
- Prim's Algorithm
- Union Find using rank and compression (not optimized)
- Union Find
- To find the shortest path from one prime to another while changing a single digit at a time, every resulting digit also being a prime.
To build and run:
git clone https://github.com/vss2sn/graph_algorithms.git
cd graph_algorithms
mkdir build
cd build
cmake .. && make
./(name of executable)