Question: Sorting Algorithms, Review Questions Why does the bubbleSort algorithm take less time on the ascending ordered list than the descending ordered list? Why does the

Sorting Algorithms, Review Questions

  1. Why does the bubbleSort algorithm take less time on the ascending ordered list than the descending ordered list?
  2. Why does the bubbleSortB algorithm take A LOT less time on the ascending ordered list than the descending ordered list?
  3. Why does the insertionSort algorithm take A LOT less time on the ascending ordered list than the descending ordered list?
  4. Why does the insertionSort algorithm take less time on the descending ordered list than the bubbleSort algorithm on the descending ordered list?
  5. Why does the selectionSort algorithm take less time on the descending ordered list than the insertionSort algorithm on the descending ordered list?
  6. Both advanced sorting algorithms are O (n log2 n) on initially random data. Why do you suppose quick sort is the fastest advanced sort on random items?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!