Home Project Code base Bubble Sort

Bubble Sort

Posted on December 28, 2014 by Edit

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.

It can be practical if the input is usually in sort order but may occasionally have some out-of-order elements nearly in position.

Program to perform sort on set of numbers using bubble sort technique

C

Tags : c
This website is made possible by displaying online advertisements to our visitors.
Please consider supporting by disabling your ad blocker.

Get new posts by email:
loading comments...
© 2023 Shivaji Varma. Made in India.