Minimum Spanning Tree

This is a demo of a graph search algorithms for finding a minimum spanning tree in an graph.

1. Kruskal's Algorithm
2. Prim's Algorithm

Visualisation by Cytoscape.js


  1. Create your graph
  2. Select an algorithm(Kruskal's Algorithm/Prim's Algorithm)
  3. Wait for the animation and result
  4. Please note:

    4.1 Each edge must have a weight to start

    4.2 For Prim's algorithm, there's a default start node. User can also choose their start node

And you can also create a new tree by addding new node or import a tree by json file.