Effective ways of Implementing Sorting Algorithms

Topics to Discuss:

  1. What is Sorting and Ways to do sorting and Basics types of Sorting techniques
  2. Application of Sorting Algorithms
  3. Sorting Techniques

1) Bubble Sort

2) Insertion Sort

3) Selection Sort

What is Sorting & Types

Sorting is ordering a list of objects. Sorting is a technique to rearrange the elements of a list in ascending or descending order

which can be

1) Numerical order (numeric values)

2) Lexicographical order (alphanumeric values)

3) Natural order ( type of alphanumeric , seems natural to human perspective)

4) Collation based order(like natural+multi language based)


Sorting can be classified in two types:

Internal Sorts:- Primary memory is main concern during sorting process. All data items are held in main memory and no secondary memory is required in this sorting process. There is a limitation for internal sorts; they can only process relatively small lists due to memory constraints. There are 3 types of internal sorts. Examples:

(i) SELECTION SORT :- Ex:- Selection sort algorithm, Heap Sort algorithm

(ii) INSERTION SORT :- Ex:- Insertion sort algorithm, Shell Sort algorithm

(iii) EXCHANGE SORT :- Ex:- Bubble Sort Algorithm, Quick sort algorithm

External Sorts:- External Memory is concern with during sorting process. Sorting large amount of data requires external or secondary memory. This process uses external memory such as HDD, to store the data which is not fit into the main memory. So, primary memory holds the currently being sorted data only. All external sorts are based on process of merging. Different parts of data are sorted separately and merged together.

Ex:- Merge Sort

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.