CS23231-Data Structures
Sorting Algorithms
[Link], AP (SG) / CSE
9791519152
bhuvaneswaran@[Link]
Introduction
Sorting and searching are two of the most common operations
performed by computers all around the world.
The sorting operation arranges the numerical and alphabetical
data present in a list, in a specific order or sequence.
Searching, on the other hand, locates a specific element across a
given list of elements.
At times, a list may require sorting before the search operation
can be performed on it.
Sorting Algorithms Rajalakshmi Engineering College 2
Sorting Techniques
Internal Sorting
External Sorting
Sorting Algorithms Rajalakshmi Engineering College 3
Internal Sorting
All sorting techniques which require the data set to be present in
the main memory are referred as internal sorting techniques.
Sorting Algorithms Rajalakshmi Engineering College 4
Examples
Insertion sort
Selection sort
Shell sort
Bubble sort
Quick sort
Heap sort
Sorting Algorithms Rajalakshmi Engineering College 5
External Sorting
External Sorting, takes place in the secondary memory of a
computer.
Since the number of objects to be sorted is too large to fit in main
memory.
Sorting Algorithms Rajalakshmi Engineering College 6
Examples
Merge Sort
Multiway Merge
Polyphase merge
Sorting Algorithms Rajalakshmi Engineering College 7
Queries?
Thank You!