Category: Sort

Sort

Bubble sort
Categories:  Sort   Inefficient  

Adjacent elements are swapped until list is sorted

Try it out!
Insert sort
Categories:  Sort   Inefficient  

Goes over unsorted part of the array and inserts each next element into its sorted position in the sorted part

Try it out!
Merge sort
Categories:  Sort   Efficient  

Splits array into one-element arrays and starts merging them into longer, sorted arrays

Try it out!
Count sort
Categories:  Sort   Efficient   Inefficient  

Counts number of occurences of each number, saves it, prints the occurences by going thorugh the count array

Try it out!
Quick sort
Categories:  Sort   Efficient  

Splits each array into two smaller arrays, left and right. Elements smaller than chosen pivot go left, rest goes right

Try it out!