Sorting Algorithms Part 1

SORTING

               When One said that Something is better than other, There must be at least one parameter to be in consideration for comparison of things. Every comparison involved one or more parameters. Two things are equal and One has to choose only one then another parameter involved  to dismiss similarities. With the comparing number of things, we select best according to requirements and priority. These process also gives us Second best, third best up to Nth best OR we say Worst in given things. This series called sorted order from best to worst. We can also generate sorted list for worst to best. I like to explain these Comparisons and sorting
with the example of BUYING SMART PHONE.
                 Today number of Smartphone models are available in Market. But One must buy according to requirements and budget. The decision of choosing one model involves a number of comparisons for priorities best model available. A person loves photography So camera result is a priority for him. Another person loves to play game So RAM size and Processor speed are his priorities. BUT when Gamer person stuck with more than one model with same RAM and Processor Then Camera result may be eliminating factor for choosing Model to buy. There are many other parameters involved for performing Sort for Searching of Best Model like OS,Sound,body,sensors,battery,availability of Body parts and much more.
                The way of Sorting any items are different. These can be done with different algorithms. Bubble sort is one of sorting algorithm used in Computer Science.

Bubble Sort

               
Bubble sorting involves bubbling up to the extreme element each time until given elements obtain its correct position according to the Sorted list of the element. Bubble Sort is also known as Sinking Sort.

                Former Mobile Buying Example , If we find the mobile model which is we don’t want to buy and remove it from list until only one mobile model left in list. Then this called Bubble Sort algorithm. Sorting of Integers in Ascending Order By Bubble Sort in C/C++ .




Comments