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).

No comments: