Monday 3 November 2014

ADVANTAGES AND DISADVANTAGES OF BUBBLE SORT

ADVANTAGES AND DISADVANTAGES OF BUBBLE SORT

The bubble sort algorithm works by repeatedly swapping adjacent element that are not in order until
the whole list of items in sequence.In this way,item can be seen as bubbling up the list according to their key values.

The primary advantage of the bubble sort is that it is popular and easy to implement.Moreover,in the bubble sort elements are swapped in place without using additional temporary storage,so the space requirements is at minimum.The main disadvantage of the bubble sort is the fact that it does not deal well with a list containing a huge number of items.This is because the bubble sort requires n-squared
processing steps for every n number of  elements to be sorted.Such as ,the bubble sort mostly suitable for academic teaching but not for real life applications.

No comments:

Post a Comment