Insertion sort

 Sorting is a process of rearranging the data items in ascending or descending order.Here the data items are shifted from one location to the other.

Insertion sort is implemented by inserting a particular element(single element) at the appropriate position. In this method, the first iteration starts with comparison of 1’s element(second element) with the 0’s element(first element). In the second iteration 2nd element(third element) is compared with the 0’s and 1’s element.


Bubble Sort Program


Bubble  sort is most popular sorting technique because it is very simple to understand and implement. The algorithm achieves its name from the fact that,with each iteration the largest value moves like a bubble to the top of the array. The bubble sort method is not efficient for large arrays.