Skip to main content

Posts

Showing posts with the label bubble sort algorithm in c

Bubble Sort Algorithm in C

BUBBLE SORT  : Bubble sort is one of the simple sorting algorithm that sometimes referred to as sinking sort . It compares each pair of adjacent element and swaps them if they are in wrong order. Let us take an unsorted list of elements and sort them by applying this algorithm. Elements of the array -                                                                 9        3        6       7       1        5 Pass 1:                    9       3       6       7       1        5       arr[0] > arr[1], Exchange             ...