Question
Bubble sort is an easy sorting algorithm. It works by repeatedly stepping throughout the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm gets its name from the way smaller elements "bubble" to the top of the list. Since it only uses comparisons to operate on elements, it is a assessment sort.
a) Consider following values sorted in an array. Sort it in rising order using Bubble sort technique showing all iterations-
15, 43, 5, 18, 27, 3, 10
b) also write down a C function to sort one dimensional integer array in ascending order using Bubble Sort technique.