Define Sorting? Types of Sorting.(BCA 3rd Semester)


 Definition of Sorting 









Sorting is a processing in which data and information in which can be arrange ascending and descending order with numeric data and alphabetic order with character data. It is a most important technique arrange systematic data with the help of user need and information. There are basic categories of sorting technique use in data structure that is-

A). Internal sorting

B). External sorting


                                    Application of Sorting


1. Identify sorting element.

2. All elements are specials.

3. Every element define the proper position.

4. All elements store the linear list.


                                              Types of Sorting


a). Insertion sorting :- In this we pick up a particular value and then insert it in suitable place in the sorted sub list.


Example:-                                        25 13 28 5 40

                                                       13 25 28 5 40

                                                       5 13 25 28 40


b). Selection sorting :- In this method searching of smallest element from the beginning of list starts, when smallest element found , then it is interchange by first element.


   Example :-                            38  13 5 26  40  18

                                                  5 13  38  26  40  18

                                                  5  13  18  26  40  38

                                                 5  13  18  26 38 40


C). Merge sorting :- In merge sort , we can take the pair of array element , merge them in sorted array and then take adjacent pair of array elements and so on , until the elements of array are in single list.

Example:-                                        30  13  18  25  40  28  50

                                                         13  30  18  25  28  40  50

                                                         13  18  25  30  28  40  50

                                                        13  18  25  28  30  40  50


d). Bubble sorting:- The bubble sort an array in each pass , every element compare with next element.


Example:-                                   25  12  40  7  45

                                                     12  25   40  7  45

                                                     12  25  7  40   45

                                               12  7  25  40  45

                                                     7  12  25  40  45  


e). Heap Sorting :- Heap sort is a lost of a elements represent in the from of a binary tree in such a way that is  must satisfy following property 

         Heap sort is a complete binary it a most important work on heap sort.

      For every node in the heap , value stored in its greater than the value of its children: known as max heap. if every node contain less than value then its children , then heap is min heap. Heap sorting is a step by step solve Equation.


        Example:-                        25    30      13      40       22

                          Fist step:25

                         Second step: 30 25

                        Third step : 30 25  13

                        Forth step :- 40   30 13 25

                        Fifth step :- 40 30 03 25 22


Read Also


             


                                                  

No comments:

Post a Comment

If you have any doubts, Please lets me know and Please Follow our Website