Visual sorting: bubble, selection and insertion step by step

Computer ScienceAlgorithms & Problem SolvingAges 13–14

Loading…

Share Report a problem

A sequence of numbers is drawn as bars; choose bubble sort, selection sort or insertion sort, then press Step or Run. Each step highlights the pair being compared, the pair being swapped and the part already sorted, while counting comparisons and swaps; the matching line of pseudocode is highlighted too. Students can drag a bar to change its value before running, and compare the cost between algorithms.