BubbleSort

Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

By: adexpert (21 month(s) ago)

excuse me ...can u make it downloadable cuz i really needed ...i have bubble ppt at college urs is so complete nd perfect

Presentation Transcript

Bubble Sort : 

Bubble Sort Bubble Sorting is an algorithm in which we are comparing first two values and put the larger one at higher index. It takes next two values compare these values and place larger value at higher index. This process do iteratively until the largest value is not reached at last index. Then start again  from zero index up to n-1 index. The algorithm follows the same steps iteratively unlit elements are not sorted.  Bubble sort is also known as exchange sort. Bubble sort is a simplest sorting algorithm

Bi-Directional Bubble Sort : 

Bi-Directional Bubble Sort The  bi-directional bubble sort compares each adjacent pair of elements in an array. The values will be swap if necessary. The values passes from the beginning to the end and also from the end to the beginning. It stops when there is no any element to swap. Bi-directional bubble sorting also known as cocktail shaker sort, shaker sort, double-direction bubble sort. The complexity of bi-directional bubble sort is O(n2).

Bi-Directional Bubble Sort : 

Bi-Directional Bubble Sort Bi-directional bubble sort is  better than bubble sort. In Bi-directional bubble sort at least one elements is moved forward or backward to its place in the array with each pass. But in the case of bubble sort moves elements by forward direction to its place, but can only move elements backward in only one location in each pass.