Stability in Sorting Algorithms

Stability in Sorting Algorithms

Publish Date: Nov 17 '24
1 0

**

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

Comments 0 total

    Add comment