Describe a case where quicksort will result in quadratic behavior. Give a concis
ID: 3766611 • Letter: D
Question
Describe a case where quicksort will result in quadratic behavior. Give a concise accurate description of a good way for quicksort to improve its performance by using insertion sort. Explain (in English) the algorithm for insertion sort. Fill in the table - use Big O notation wo of your co workers (Sam and Kris) both wrote a different unique sorting algorithm. Initial tests (with 50 data elements) show that Kris' program ran approximately 5x faster (Sam's took 5x as long to complete) As the chief engineer, you need to figure out which one to use - Should Sam's program be dropped in favor of Kris' Is Kris' better' Why or why not What other tests would you run (what other criteria would you be looking for) Make sure you explain your answer. Answer True or False Sorting a chain of linked nodes is usually easier than sorting an array The recursive selection sort performs the same operators as the iterative method Performance of the selection sort depends on how scrambled the data is before starting Shell sort is based on insertion sort. A disadvantage of merge sort is the need for a temporary array during the merge step. In quick sort, the choice of pivots affects its behavior. Divide and conquer algorithms can only be written recursively Radix sort is a general-purpose sorting algorithm.Explanation / Answer
worst case avrage case insertation sort O(N2) O(N2) merge sort O(N.log2 N) O(N.log2 N) quick sort WITH "median of three" pivot selection O(N2) O(N.log2 N) selection sort O(N2) O(N2)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.