For [2,4,3], inserting 3 shifts 4 one position and produces [2,3,4].
Read the related guide · · Bookmark this unique URL with Ctrl/Cmd+D.
Insertion sort builds a sorted prefix by shifting larger prefix values to make room for each next value. Experiment with a small example and see each step update.
For [2,4,3], inserting 3 shifts 4 one position and produces [2,3,4].
Read the related guide · · Bookmark this unique URL with Ctrl/Cmd+D.