What does the stability of the algorithm mean?

such as sorting algorithm. Bubbling is stable and choice is unstable.
what exactly is the standard to measure whether it is stable or not

Mar.09,2021

stability is the same size of elements, sorted in the same order as before.

for example, the following key-value pair data:

A:1
B:2
C:1

now sort by numerical value, because the values of An and C are the same and can be sorted as:

C:1
A:1
B:2

can also be arranged as:

A:1
C:1
B:2

the second result is a stable sort result, because A comes before C in the input data, and An also precedes C in the sort result.

Menu