Catalog

Sorting Algorithms

Computing Algorithms 2D

Sorting Algorithms

How to use

Choose an algorithm, the kind of list and its size. Press Play to animate or Step to advance one operation at a time; the pseudocode highlights the line being executed.

Colours: yellow = comparison, red = swap, light blue = write (merge sort), purple = pivot or current minimum, green = element already in its final place. The light band shows the part of the list the algorithm is working on.

In Race mode, two algorithms sort the same list, one operation at a time. Make your prediction before the start! Compare the counters with the complexity table.

In Be the algorithm, you make the swaps: tap two bars to swap them, in exactly the order bubble sort or selection sort would.

Learning goals