Question

Which, if any, of the algorithms bubble-sort, heap-sort, merge-sort, and quick- sort are stable? ( use...

  1. Which, if any, of the algorithms bubble-sort, heap-sort, merge-sort, and quick- sort are stable? ( use the algorithms as presented in the text, without special tie-breaking rules; answer separately for the three-way quicksort and the two-way in-place quicksort . )

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

Stable sorting algorithms maintain the relative order of records with equal keys (i.e. values). That is, a sorting algorithm is stable if whenever there are two records R and S with the same key and with R appearing before S in the original list, R will appear before S in the sorted list.

STABLE SORTS

  • Bubble sort
  • merge-sort

UNSTABLE SORTS

  • heap-sort
  • quick- sort

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Which, if any, of the algorithms bubble-sort, heap-sort, merge-sort, and quick- sort are stable? ( use...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT