Krusal’s Algorithm

  • Edge-based method.
  • Use Disjoint Set to maintain the tree.

Prim’s Algorithm

  • Node-based method.
  • Use a list of node indices to maintain the tree.