Skip to content
Code ReadingInsertion Sort
Bug Hunt

Insertion Sort

Items shift correctly, but x is written to the wrong slot: [3, 1, 2] does not get sorted. Find the line and the kind of bug.

Click the line you think is wrong.