Skip to content

Insertion sort breakdown

Giorgio Garofalo edited this page Jan 29, 2024 · 4 revisions

Insertion sort

This sample sorts the values 7, 10, 1, 46, 19, 8 using an insertion sort algorithm and a custom color scheme that makes it look like the Golden Gate Bridge in a sunny day.

Running the standardize command adapts it to the default scheme and produces the following:

Running decompact, plus some manual recolor, produces an output that has the look of familiar programming languages:

Explanation:

See Lists & loops for further information.