Sorting Visualizer

Hello! This is a sorting visualizer, meaning you can visualize different sorting algorithms. The ones listed are some of the better known ones. You should first start by generating a random array ( group ) of numbers. Initially you start with 32 numbers, but you can change the number by pressing "+" or the "-" under "Numbers length" and then pressing "Generate". You can press "Generate" again if you want to get a new random group of numbers.

Sorting Algorithms
  1. Bubble Sort is one of the more inefficient algorithms, as it passes through the array several times. The way it works is it compares adjacent numbers as it's passing through the array and the bigger one gets moved to the right. The bigger numbers rise like "bubbles" in water. Eventually the entire array will be sorted.
  2. Selection Sort works by selecting either the smallest (minimum) or the biggest (maximum) element in the array, and it moves it either outmost to the left (for minimum) or the right (for maximum).
  3. Insertion Sort works by moving elements to the left as long as they are smaller. This slowly builds a group of sorted numbers.
  4. Quick Sort starts by choosing a number as "pivot" (reference). In this example it will be the right-most element. After that, we start from the left and we go through the array. The elements which are bigger get placed after the pivot, while the smaller elements will stay on the left. Once this is done we repeat the same process for the two groups (of smaller and bigger numbers compared to the pivot). Eventually all the elements will be sorted.
Animation speed
Sorting Visualizer
Numbers length
32
Sorting algorithms