morioh

Recent Notes

  • Morioh

    13 Oct 2026

  • Ideas

    13 Oct 2026

  • computer-systems-a-programmers-perspective-notes

    07 Sept 2026

  • Pi Cheatsheet

    27 Aug 2026

  • Admonition Cheatsheet

    25 Aug 2026

  • iTerm2 Cheatsheet

    25 Aug 2026

Tags

  • annotation
  • book
  • chatgpt
  • cheatsheet
  • course
  • cs
  • cs/algorithms
  • cs/compilers
  • cs/compilers/llvm
  • cs/cs-hub.md
  • cs/data-structures
  • cs/hacking
  • cs/hacking/cheatsheet
  • cs/hacking/htb
  • cs/hacking/metasploit
  • cs/hacking/stack-overflow
  • cs/hacking/thm
  • cs/hacking/tryhackme
  • cs/hacking/writeup
  • cs/lists
  • cs/relocations
  • cs/software-engineering
  • cs/sorting
  • cs/systems
  • cs/theory
  • cs/uml
  • help
  • hub
  • inbox
  • key
  • leetcode
  • notes
  • obsidian
  • study
  • systems
  • university
  • university/cs2001
  • university/cs2002
  • university/cs2003
  • university/cs2004
  • university/cs2005
  • university/cs2005/lab
  • university/cs3002
  • university/cs3072
  • university/exam2023
  • work/engineer-training
Home

❯

notes

❯

cs

❯

algorithms

❯

Kruskal's Algorithm

Kruskal's Algorithm

06 Jun 20221 min read

Kruskal’s Algorithm


It is a minimum spanning subtree algorithm.

It performs well for sparse graphs due to simple data structures: O(​E log N).

The way it works:

  1. Choose the shortest edge.
  2. Choose the next shortest edge, ensure it does not form a cycle in the subtree formed so far. If a cycle is formed, discard the edge.
  3. Repeat step 2 until there are (N−1) edges in the subtree.

See also

  • Minimum Spanning Subtree
  • trees
  • graphs
  • big-o-notation
  • Pimm’s

Nav

Computer Science


Graph View

  • Kruskal’s Algorithm
  • See also

Backlinks

  • Minimum Spanning Tree
  • Prim's Algorithm
  • Computer Science
  • Knowledge Hub

Created with Quartz v5.0.0 © 2026

  • GitHub