pranjay-poddar / Dev-Geeks

open source project
https://devgeeks-os.netlify.app/repository_web_page/
MIT License
599 stars 823 forks source link

Kruskal's Algorithm #5111

Open atumat opened 1 year ago

atumat commented 1 year ago

Describe the project you want to add with tech stack kruskal's Algorithm is used to find the minimum spanning tree for a connected weighted graph. The main target of the algorithm is to find the subset of edges by using which we can traverse every vertex of the graph. Tech Stack: C

Expected behavior In Kruskal's algorithm, we start from edges with the lowest weight and keep adding the edges until the goal is reached. The steps to implement Kruskal's algorithm are listed as follows -

First, sort all the edges from low weight to high. Now, take the edge with the lowest weight and add it to the spanning tree. If the edge to be added creates a cycle, then reject the edge. Continue to add the edges until we reach all vertices, and a minimum spanning tree is created.

atumat commented 1 year ago

@MohitGupta121 @TusharKesarwani @pranjay-poddar Please assign me this issue. I want to add this .