Graph Algorithms

This repository contains graph algorithms in C++.

Algorithms:

  1. To find all paths between 2 vertices
  2. Ford Fulkerson Algorithm
  3. To find k cores (Connected components after all vertices with degree less than k have been removed)
  4. To find the k numbers that occur the most frequently in a vector
  5. Kruskal's algorithm
  6. To find the (a) mother vertex
  7. To find path length greater than k
  8. Prim's Algorithm
  9. Union Find using rank and compression (not optimized)
  10. Union Find
  11. 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)