QUICK-SORT

Quick-sort is very fast, pedagogically important, and challenging to understand.

Check out the simplest way to partition the array, while still in-place.

Continue reading →

MERGE-SORT

Merge-sort is very fast, and its only downside is that it is typically not in-place.

See why it has a guaranteed worst-case time complexity of O(n log n).

Continue reading →

INSERTION-SORT

A simple algorithm that is more efficient in practice for small arrays than asymptotically better algorithms.

Understand how and why it works in O(n²).

Continue reading →


BUBBLE-SORT

Even if better sorting algorithms exist, bubble-sort is still interesting to study and is pedagogically relevant.

Check out the lesser-known reason of why exactly it terminates.

Continue reading →

BINARY SEARCH

Binary search is absolutely fascinating. It is one of the few algorithms that is faster than the size of the input.

Understand how it works, how to implement it, and why it is so fast.

Continue reading →