Sorting Terminology
- In-place Sorting: An in-place sorting algorithm uses constant space for producing the output (modifies the given array only). It sorts the list only by modifying the order of the elements within the list. Examples: Selection Sort, Bubble Sort Insertion Sort and Heap Sort.
- Internal Sorting: Internal Sorting is when all the data is placed in the main memory or internal memory. In internal sorting, the problem cannot take input beyond its size. Example: heap sort, bubble sort, selection sort, quick sort, shell sort, insertion sort.
- External Sorting : External Sorting is when all the data that needs to be sorted cannot be placed in memory at a time, the sorting is called external sorting. External Sorting is used for the massive amount of data. Examples: Merge sort, Tag sort, Polyphase sort, Four tape sort, External radix sort, etc.
- Stable sorting: When two same data appear in the same order in sorted data without changing their position is called stable sort. Examples: Merge Sort, Insertion Sort, Bubble Sort.
- Unstable sorting: When two same data appear in the different order in sorted data it is called unstable sort. Examples: Quick Sort, Heap Sort, Shell Sort.
Sorting Algorithms
A Sorting Algorithm is used to rearrange a given array or list of elements according to a comparison operator on the elements. The comparison operator is used to decide the new order of elements in the respective data structure.
For Example: The below list of characters is sorted in increasing order of their ASCII values. That is, the character with a lesser ASCII value will be placed first than the character with a higher ASCII value.
Table of Content
- What is Sorting?
- Sorting Terminology
- Characteristics of Sorting Algorithms
- Applications of Sorting Algorithms
- Basics of Sorting Algorithms
- Sorting Algorithms
- Library Implementations
- Easy Problems on Sorting
- Medium Problems on Sorting
- Hard Problems on Sorting
Contact Us