Stability in Sorting Algorithms

harsh_bhardwaj_809a89d3a7

Harsh Bhardwaj

Posted on November 17, 2024

Stability in Sorting Algorithms

**

Definition-

**
Stability in a sorting algorithm refers to the preservation of the relative order of records with equal values. Useful in Databases where secondary keys need to be stable.
Examples-

  1. Bubble Sort
  2. Merge Sort
  3. Insertion Sort

Difference between Stable and Unstable

Image description

💖 💪 🙅 🚩
harsh_bhardwaj_809a89d3a7
Harsh Bhardwaj

Posted on November 17, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Stability in Sorting Algorithms
dsa Stability in Sorting Algorithms

November 17, 2024