Run to execute this JavaScript code for real (output appears here).
Ready.
Divides the array into a sorted prefix and an unsorted suffix. Each pass selects the minimum of the unsorted part and swaps it into the next position of the prefix. Press Run (Ctrl + Enter) to animate, or Step forward (F10) to go one event at a time.
Step
1 / 42
Line (JavaScript)
—
main (no active function frames)
No counted operations yet.
[29, 10, 14, 37, 13]