- ✕This summary was generated using AI based on multiple online sources. To view the original source information, use the "Learn more" links.
Comparison-based sorting algorithms determine the order of elements by comparing them using a defined comparison function. They have a theoretical lower bound of O(n log n) for the best possible average-case performance.
Examples include: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort.
Key Characteristics:
Time Complexity: O(n²) group: Bubble Sort, Selection Sort, Insertion Sort (worst/average case). O(n log n) group: Merge Sort, Heap Sort, Quick Sort (average/best case; worst case O(n²) for naive Quick Sort).
Space Usage: In-place: Bubble, Selection, Insertion, Heap, Quick Sort. Not in-place: Merge Sort (requires O(n) extra space).
Stability: Stable: Bubble, Insertion, Merge. Unstable: Selection, Heap, Quick (unless modified).
Online Capability: Insertion Sort can handle incoming data during sorting.
Python Example – Merge Sort (Stable, O(n log n)):
Sorting Algorithms Animations - Toptal
These pages show 8 different sorting algorithms on 4 different initial conditions. These visualizations are intended to: Show how each algorithm operates. Show that there is no best …
Analysis of different sorting techniques - GeeksforGeeks
Jul 28, 2025 · In this article, we will discuss important properties of different sorting techniques including their complexity, stability and memory constraints. Before understanding this article, …
Comparative Analysis of 13 Different Sorting Algorithms
Oct 31, 2024 · As we delve into the complex world of algorithms, a key question arises: which sorting algorithm reigns supreme? In this analytical exploration, we will dissect and compare 13 …
Comparing Popular Sorting Algorithms: A Practical Overview
Jun 20, 2025 · This article compares commonly used comparison-based and non-comparison-based sorting algorithms, along with their time complexities, stability, and typical use cases.
- People also ask
Comparison of Sorting Algorithms - CodeProject
Share your opinions and help inform our yearly report. →. Loading... Copyright 1999- 2025 © CodeProject. All Rights Reserved.
Sorting Algorithms Comparison | Compile N Run
A comprehensive guide to understanding and comparing different sorting algorithms based on their efficiency, time complexity, space complexity, and practical use cases.
Comparative Analysis of Sorting Algorithms: A Review
Nov 23, 2024 · In the realm of computer science, sorting algorithms play a pivotal role in optimising data organisation and retrieval processes across various applications. Th
Sorting algorithm - Wikipedia
Comparison sorting algorithms have a fundamental requirement of n log n - 1.4427n + O (log n) comparisons. Algorithms not based on comparisons, such as counting sort, can have better …
Sorting algorithms compared - Ada Computer Science
Choosing which sorting algorithm to use depends on certain factors, such as how efficient it is on large sets of data (and therefore how much time it will take to complete) or how much memory …
Deep dive into Sorting Algorithms Comparison