
Among Selection Sort, Insertion Sort, Mergesort, Quicksort, and Heapsort, which
A) The list has several hundred records. The records are quite long, but the keys are very short.
B) The list has about 25,000 records. It is desirable to complete the sort as quickly as possible on the average, but it is also critical that the sort be completed quickly in every single case.
C) The list has about 45,000 records, but it starts off only slightly out of order.


Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images

- What is the average-case running time for Merge Sort and Quick Sort, respectively? Why do we prefer Quick Sort algorithm in practice? Please provide at least two benefits of Quick Sort and also provide explanations for each benefit (plain language explanation is fine).arrow_forwardPlease provide a brief description of linear sort and an example of its use.arrow_forwardThe interchange implementation was supposed to be better than the transpose implementation as it implements the same algorithm without the need of copying the 640,000 elements. However, it is not. How do you explain this inconsistency?arrow_forward
- 3. Given the following list: 9 4 2 6 7 5 3 8 Identify the state of the list while being sorted using the selection sort algorithm.arrow_forwardWhat does it mean by "entries" in this context? I still do not understand why sorting is not needed. If we sort all the books according to the publisher name, wouldn't it be faster to count how many books are pulished by each publisher? The answer states we need a "counter", but when you go through the entries for each of the keys, don't we need to have 30 counters in total? (each counter is associated with one pulbisher. In other words, when a book pulisher matches with one of the keys, shouldn't it increment the counter variable associated with that pulisher?) Please clarify questions reagrding the answerarrow_forwardIn python don't import librariesarrow_forward
- For the terminology stored in each cell of the table below, choose a corresponding key point from the Hints section below and put the number (not the text). Some choices may be used multiple times or not at all. Dictionary(map) ADT: Quicksort: Mergesort: Radix sort over big integer numbers: Insertion sort: Selection sort: Heapsort: Counting sort over a small range of integers: Bucket sort: Bubble sort: Depth-First-Search: Bellman-Ford’s algorithm: Prim’s algorithm: Dijkstra’s algorithm: 0-1 knapsack problem: Hints : sorting: continuously swapping elements while finding the next number to add in the sorted sublist sorting: an improved selection sort - extracting the root of a binary tree to get the maximal/minimal key sorting: removing one element from the input data, then finding the location it belongs within the sorted sublist, and inserts it there sorting: in general, sorting the least significant position first sorting: finding the smallest element in the…arrow_forwardGiven a list containing the values: 8 7 59 3 4. a. Perform a trace of bubble sort as it would sort this list. b. What is the efficiency of bubble sort?arrow_forwardAnswer the question using bubble sort, enhanced bubble sort (this was the version presented in lecture), selection sort, and insertion sort. Thy has data that she suspects may already be sorted. Which sorting method should she NOT use and why?arrow_forward
- Create and test assumptions regarding the running times of insertion sort and selection sort for arrays with just two key values, assuming the values are equally likely to occur.arrow_forward6. Below is a table that shows the timing of three different algorithms using an array of integers as input. Explain which of the algorithms is most likely the selection sort and which is the merge sort, explain in details your answer. Algorithm 1 Algorithm 2 Algorithm 3 time to process 2000 integers 0.1431 sec 0.8011 sec 0.0132 sec time to process 4000 integers 0.5722 sec 1.4300 sec 0.0304 sec time to process 8000 integers 2.2989 sec 2.4512 sec 0.0634 secarrow_forwardCase Project 10-1: Password Security Inadequate password security is one of the areas that the auditors believe needs improve-ment. A former server administrator acquiesced to bank employees’ complaints about fre-quent password changes and set very lax account policies for passwords. The audits raised the following concerns: Some bank employees have used the same user account password for several years. Many of the existing passwords are only four or five characters in length. Several bank employees regularly change their passwords but rotate between the same three or four passwords with each change. An employee who has forgotten a password can keep trying different combinations for as long as they like, until they hit upon the password or give up trying. What capabilities in Windows Server 2016 enable the bank to address the auditors’ concerns? Create a detailed report of your recommendations for the bank’s Audit Response Committee. Also, for the IT manager who is a committee…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





