Paste the array changes step by step. This page checks whether the pattern looks like Bubble Sort, Selection Sort, Insertion Sort, Counting Sort, or Radix Sort.
Write one array per line. The label can be anything, but the array must be inside square brackets.
Start: [5, 1, 4, 2, 8] Pass 1: [1, 4, 2, 5, 8] Pass 2: [1, 2, 4, 5, 8]
The tool simulates each sorting algorithm from the starting array and compares its generated passes with the passes entered by the user. The closest match gets the highest score.
Some algorithms can produce the same intermediate array for small inputs. In that case, the page shows the best match with confidence scores. More passes usually improve accuracy.
Bubble Sort Selection Sort Insertion Sort Counting Sort Radix Sort