Bubble Sort in C - Bubble Sort using C Program
Learn C - C tutorial - bubble sort using c program - C examples - C programs
Bubble Sort using C Program
- Comparing each pair of adjacent elements and swaps them if they are out of order.This process is said to be bubble sort algorithm.
- To apply the Bubble Sort we follow the below steps.
- Compare first two elements and exchange them if they are out of order.
- Decrease one element and compare second and third elements. Exchange if necessary. Continue until end of array.
- Repeat process and exchanging as necessary.
- Repeat until a pass is made with no exchanges.