33.9k views
3 votes
Discuss stable vs. unstable algorithm. Please be nice and clear inyour explanation

User Tremor
by
5.6k points

1 Answer

4 votes

Answer:

Stable algorithm:- in this type of algorithm the actual or original order of the key value is maintained.This maintains the original order while sorting. A algorithm is stable if they have the relative sequence of numbers/records if there is any case of tie.

Unstable algorithm:- an algorithm is stated as unstable when it produces second output or outcome. They don't usually maintain the original order of key value.

User Dragouf
by
5.2k points