DEV Community

Cover image for Stability in Sorting Algorithms
Harsh Bhardwaj
Harsh Bhardwaj

Posted on

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

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay