Bubble Sort
Sorting Techniques
-
In-place Sorting and Not-in-place Sorting in place sorting do not require extra space for sorting not in place sorting requires extra space for sorting operation
-
Stable and Not Stable Sorting stable sorting does not change the sequence of similar content in which they appear.
Not Stable Sorting changes the sequence of similar content in which they appear.
- Adaptive and Non-Adaptive Sorting Algorithm adaptive algorithm, if it takes advantage of already ‘sorted’ elements in the list that is to be sorted. A non-adaptive algorithm is one which does not take into account the elements which are already sorted.
Bubble Sorting
it is comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order.
average and worst case Time complexity are of Ο(n2) where n is the number of items
- not In-place sorting algorithm if we used our technique for swpping it becomdes in-place sorting
- Stable algorithm
- Adaptive algorithm