Each sorting algorithm has its own pros and cons. This article classifies sorting algorithms into 5 category which will help you decide the best fit for your own use case.
List of sorting algorithms:
- Bubble Sort
- Quick Sort
- Insertion Sort
- Merge Sort
- Selection Sort
- Heap Sort
- Counting Sort
- Radix Sort
Classifications
Time complexity
Space complexity: In-place (constant space) v/s memory usage increase with input size
Recursive v/s Non-recursive
Stability: stable sort v/s unstable sort
Memory/Disk storage: Internal sort v/s External sort. If RAM or memory is used to store all records then it is internal sort. If records are on disk/tapes then it is external sort.