Description
Sorting technoques and Bubble sort explanatio0n
Presentation Transcript
Sorting : Sorting Sorting is the process of arranging the list or the array in ascending or descending order. Following are the methods of sorting :
i) Bubble Sort ii) Exchange sort iii) Insertion Sort
iv) Selection Sort v) Shell sort vi) Quick sort
vii) Radix sort vii) Merge Sort
Bubble Sort :
Bubble Sort method is the most commonly used method. Arranging an array in descending order using bubble sort method is explained below :
In Bubble Sort method the largest of all the elements (in the case of arranging in descending order) is put at the 1st place, the second largest is put at the 2nd position …and so on. Finally, the second smallest is placed at the second last position and the smallest element is put at the end or last. In case of sorting in ascending order just the reverse procedure is followed. That is, the smallest element is put at the top of the array, next smallest at next below it ……and so on. Finally, the largest of all is placed at the end of the array.
The method is explained below :
Your Facebook Friends on WizIQ