Member-only story

Popular Sorting Algorithms

randerson112358
7 min readMar 9, 2019

--

In computer science a sorting algorithm is an algorithm that puts elements of a list in a certain order.

Almost any list that comes out of a computer is sorted into some sort of order, and there are many more sorted lists inside computers that the user doesn’t see. Many clever algorithms have been devised for putting values into order efficiently. Below are a few popular sorting algorithms:

Bubble Sort

Animation Of The Bubble Sort Algorithm

Bubble Sort — Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm, which is a comparison sort, is named for the way smaller elements “bubble” to the top of the list. Although the algorithm is simple, it is too slow and impractical for most problems even when compared to insertion sort.

--

--

No responses yet