Your complete learning companion for Analysis of Algorthims. Explore the theory, trace the code, and understand why it works.
Find 43 in a sorted array.
Follow the supplied lectures in order, or go straight to the concept you need.
Git, Java and the language of algorithms.
LECTURES 00–0202 /Euclid, experiments and mathematical models.
LECTURES 03–0403 /Connectivity, growth rates and asymptotic bounds.
LECTURES 05–0604 /Stacks, queues and amortized performance.
LECTURE 07Original implementations, with the reasoning that makes the code click.
Locate a key in a sorted array by halving the candidate interval.
Θ(log n) · Original Java codeNumber theoryFind the greatest common divisor by repeatedly taking a remainder.
O(log min(p, q)) · Original Java codeUnion–findAttach the smaller component beneath the larger one to limit tree height.
O(log n) per operation · Original Java codeGo beyond memorizing Big O. See how input size changes the work, compare growth rates, and learn to justify every bound.
Explore the complexity guideSimple explanations, formal definitions and the original slides sit together.
Read the original Java, copy it, and trace the important steps with small inputs.
Review the key distinctions, test your understanding, and save your next lesson.