What is sorting? Types of Sortings

  • Sorting Algorithms are methods of reorganising a large number of items into some specific order such as highest to lowest, or vice-versa, or even in some alphabetical order.

  • These algorithms take an input list/array, processes it (i.e, performs some operations on it) and produce the sorted list.


  • Sorting arranges data in a sequence which makes searching easier.

  • The most common example we experience every day is 

    • Telephone Directory

    • Dictionary

    • sorting clothes or 

    • other items on an e-commerce website either by lowest-price to highest, or list by popularity,

    •  or some other order.


There are two different categories in sorting:

  • Internal sorting: If the input data is such that it can be adjusted in the main memory at once, it is called internal sorting.

  • External sorting: If the input data is such that it cannot be adjusted in the memory entirely at once, it needs to be stored in a hard disk, floppy disk, or any other storage device. This is called external sorting.

The two main criteria to judge which algorithm is better than the other have been:

  1. Time taken to sort the given data.

  2. Memory Space required to do so

Post a Comment

0 Comments