-
Which, if any, of the algorithms bubble-sort, heap-sort,merge-sort, and quick- sort are stable? ( use the algorithms aspresented in the text, without special tie-breaking rules; answerseparately for the three-way quicksort and the two-way in-placequicksort . )
Answer
`Hey,
Note: Brother in case of any queries, just comment inbox I would be very happy to assist all your queries
Stable sorting algorithms maintain the relativeorder of records with equal keys (i.e. values). That is, asorting algorithm is stable if whenever there are tworecords R and S with the same key and withR appearing before S in the original list,R will appear before S
OR
OR