/Graph-Algorithms

Prim and Dijkstra algorithms

Primary LanguageC

Graph Algorithms

Graph algorithms using adjacency matrix

  • Prim Algorithm

  • Prim's algorithm is a minimum spanning tree algorithm that takes a graph as input and finds the subset of the edges of that graph which form a tree that includes every vertex and has the minimum sum of weights among all the trees that can be formed from the graph.

  • Dijkstra's Algorithm

  • Dijkstra's algorithm allows us to find the shortest path between any two vertices of a graph.It differs from the minimum spanning tree because the shortest distance between two vertices might not include all the vertices of the graph.