Graph Algorithms

Graph Algorithms

C Program of Huffman coding using Greedy Algorithm Approach

C Program of Huffman coding using Greedy Algorithm Approach : This code is not written by me. I found a great article on Geeks for Geeks and thought it worth sharing. Still if you have any doubts ask me in form of comments. Basic of Huffman Coding : Huffman coding is a lossless data compression algorithm. The idea is to...

C program to Find Minimum Spanning tree KRUSKAL’s Algorithm

C program to Find Minimum Spanning tree KRUSKAL's Algorithm : Kruskal's algorithm is a greedy algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is...

C program to find Minimum Spanning tree PRIM’s Algorithm

C program to find Minimum Spanning tree PRIM's Algorithm : Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a connected weighted undirected graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. General apporach...

C Program to Find shortest Path using dijkstra’s algorithm

C Program to Find shortest Path using Dijkstra's algorithm : Dijkstra's algorithm is a graph search algorithm that solves the single-source shortest path problem for a graph with non-negative edge path costs, producing a shortest path tree. This algorithm is often used in routing and as a subroutine in other graph algorithm. Dijkstra's Algorithm to find shortest Path : Let the...