Graph-Visualization / graph-api

Backend containing all the algorithms of graphs
http://graph-apiv1.herokuapp.com
3 stars 8 forks source link

Minimum Spanning Tree #31

Closed Debanjan2001 closed 3 years ago

Debanjan2001 commented 3 years ago

1) Added Disjoint Set data structure for union/find 2) Added prim.js and kruskal.js for the algorithms 3) created "mst_test_kruskal_prim.json" under "testfiles" folder for testcases.

Here are the input and outputs:

Input:

Screenshot from 2020-12-13 15-48-18

Testcase0 and Testcase1 taken from gfg:(attaching here for crosschecking with output):

TestCase0 TestCase1

Output :

output

Fixes #8

Debanjan2001 commented 3 years ago

@Biswajitghosh98 If you are free please check this.

Biswajitghosh98 commented 3 years ago

LGTM ! Thanks for the contribution ! @Debanjan2001