Oh My Algorithm
AlgorithmsExam study
KO
←
Graphs

Algorithms · Graphs

Choose one to explore step by step

Connections, paths, and minimum costs in graphs

Ordering

Topological Sort

O(V+E)

Order directed graph vertices so every prerequisite appears first.

Shortest Path

Dijkstra

O(E log V)

Find shortest paths from a source when edge weights are nonnegative.

Bellman-Ford

O(V·E)

Find shortest paths in a graph that can contain negative edges.

Minimum Spanning Tree

Kruskal MST

O(E log E)

Build a minimum spanning tree by considering edges in increasing weight.

Prim MST

O(E log V)

Grow a minimum spanning tree from an initial vertex.

Learning topics

O-M-A/© 2026 OH MY ALGORITHM
AboutPrivacyTerms