Sorting Algorithm

Sorting Algorithms

Sorting Algorithms re-order elements inside a array (sometimes referred to as a list), to be obviously ordered. A example on how the general sorting algorithms sort can be located here.

Sorting Algorithms are often classified by Computational Complexity, Memory Usage, General Form, Stability and Adaptability.

Sorting of the list and its efficiency for good behavior of a serial sorting is O(nlogn) and a bad behavior is O(n2). (See Big O Notation)

Bubble Sort

Bubble sorting is one of the easier sorting methods to write, not necessarily the fastest or most efficient however, hence why the are not commonly used in practice, only in educational pieces as a introduction into sorting.

Bubble Sort


Bubble Sort is one of the more simplest sorting algorithm that steps through each of data, swapping them if its larger than the one next to it. It repeats this n times until it has not required to move any more pieces. The performance for this method is O(n2) for its average and worst situations, so its not commonly used.

A program, of sorts, at the following address shows an algorithm at work : (

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License