Wednesday, January 28, 2009

Bubble Sort

  • In the Bubble sort the adjacent elements are compared.If they are not in order they are swapped.Now based on how the user wants it can either be in ascending order or descending order.

  • The time complexity of the bubble sort is o(n2).

Sorting

Sorting is defined as the proces of arranging items in a sequence ,some of the sorting algorithms are:
1)Bubble Sort
2)Heap Sort
3)Insertion Sort
4)Radix Sort
5)Heap Sort
6)Quick Sort