Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 12, Problem 42CRP
Program Plan Intro
Merge sort:
Merge sort is a divide and conquer
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Given these 8 numeric values to be sorted using the recursive Mergesort algorithm:
92 63 24 18 69 27 64 43
The list that will be passed to the first call of the Mergesort algorithm will be the entire list of values above.
Show the list that will be passed to the 5th call of the Mergesort algorithm.
TRUE or FALSE? Suppose you have been given a sorted list of 100 names and needed to find a particular name in that list. Using sequential search, it is possible that you might have to look at every location in list before finding the desired name.
Among Selection Sort, Insertion Sort, Mergesort, Quicksort, and Heapsort, which algorithm would you choose for the situation below? Only pick one algorithm.The simplicity of implementation should also be considered AFTER the consideration of speed, the number of assignment operation and the extra space requirement. Use the chart below for your considerations.
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.
Chapter 12 Solutions
Computer Science: An Overview (12th Edition)
Ch. 12.1 - Prob. 1QECh. 12.1 - Prob. 2QECh. 12.1 - Prob. 3QECh. 12.1 - Prob. 4QECh. 12.2 - Prob. 1QECh. 12.2 - Prob. 2QECh. 12.2 - Prob. 3QECh. 12.2 - Prob. 4QECh. 12.2 - Prob. 5QECh. 12.3 - Prob. 1QE
Ch. 12.3 - Prob. 3QECh. 12.3 - Prob. 5QECh. 12.3 - Prob. 6QECh. 12.4 - Prob. 1QECh. 12.4 - Prob. 2QECh. 12.4 - Prob. 3QECh. 12.5 - Prob. 1QECh. 12.5 - Prob. 2QECh. 12.5 - Prob. 4QECh. 12.5 - Prob. 5QECh. 12.6 - Prob. 1QECh. 12.6 - Prob. 2QECh. 12.6 - Prob. 3QECh. 12.6 - Prob. 4QECh. 12 - Prob. 1CRPCh. 12 - Prob. 2CRPCh. 12 - Prob. 3CRPCh. 12 - In each of the following cases, write a program...Ch. 12 - Prob. 5CRPCh. 12 - Describe the function computed by the following...Ch. 12 - Describe the function computed by the following...Ch. 12 - Write a Bare Bones program that computes the...Ch. 12 - Prob. 9CRPCh. 12 - In this chapter we saw how the statement copy...Ch. 12 - Prob. 11CRPCh. 12 - Prob. 12CRPCh. 12 - Prob. 13CRPCh. 12 - Prob. 14CRPCh. 12 - Prob. 15CRPCh. 12 - Prob. 16CRPCh. 12 - Prob. 17CRPCh. 12 - Prob. 18CRPCh. 12 - Prob. 19CRPCh. 12 - Analyze the validity of the following pair of...Ch. 12 - Analyze the validity of the statement The cook on...Ch. 12 - Suppose you were in a country where each person...Ch. 12 - Prob. 23CRPCh. 12 - Prob. 24CRPCh. 12 - Suppose you needed to find out if anyone in a...Ch. 12 - Prob. 26CRPCh. 12 - Prob. 27CRPCh. 12 - Prob. 28CRPCh. 12 - Prob. 29CRPCh. 12 - Prob. 30CRPCh. 12 - Prob. 31CRPCh. 12 - Suppose a lottery is based on correctly picking...Ch. 12 - Is the following algorithm deterministic? Explain...Ch. 12 - Prob. 34CRPCh. 12 - Prob. 35CRPCh. 12 - Does the following algorithm have a polynomial or...Ch. 12 - Prob. 37CRPCh. 12 - Summarize the distinction between stating that a...Ch. 12 - Prob. 39CRPCh. 12 - Prob. 40CRPCh. 12 - Prob. 41CRPCh. 12 - Prob. 42CRPCh. 12 - Prob. 43CRPCh. 12 - Prob. 44CRPCh. 12 - Prob. 46CRPCh. 12 - Prob. 48CRPCh. 12 - Prob. 49CRPCh. 12 - Prob. 50CRPCh. 12 - Prob. 51CRPCh. 12 - Prob. 52CRPCh. 12 - Prob. 1SICh. 12 - Prob. 2SICh. 12 - Prob. 3SICh. 12 - Prob. 4SICh. 12 - Prob. 5SICh. 12 - Prob. 6SICh. 12 - Prob. 7SICh. 12 - Prob. 8SI
Knowledge Booster
Similar questions
- this is a data structure and algorithim question so do it correctly and carefullyarrow_forwardHow many references must you changes to insert a node between two nodes in a double linked list. Show your answer with a drawing highlighting the new references. Assuming current is the reference of the next-to-last node in a linked list, write a statement that deletes the last node from the list. What is the time complexity of deleting a node from a linked listed? Is it faster than deleting a node from an array? Why?arrow_forward4- Sort the list A[]={ 20, 13,4, 34, 5, 15, 90, 100, 75, 102, 112, 1} a) Using Merge Sort and show the order that the Merge procedure is performed. b) Explain the average case of Merge Sort. Give a detail explanation of how we can estimate the mean in relationship with the worst and best-case scenarios (hint: use the answer for question 3 as a lower-bound for the average).arrow_forward
- If the original list has n items, how many times can the list be cut in half using merge sort?arrow_forwardDraw what a Skip List could look like after you insert 3, 10,5, 18, 14,9,4 in that order. There can be many possible structures of such a Skip List since it is a randomized data structure. The same sequence of inserts/deletes may produce different structures depending on the outcome of random coin flips.arrow_forwardQuestion in image Please explain how to do with the answer. Thank you.arrow_forward
- Given 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_forwardsubject: data structure and algorithms Q: Suppose a list of 650 elements is sorted using Bubble sort i. What is the total number of Passes?ii. What is the total number of steps in all Passes?iii. What is the number of steps in Pass# 34, Pass# 134 and Pass# 434?arrow_forwardConsider the following list: 753121173265514 1. If the above list was sorted using Selection sort, which two elements would be swapped first? 2.If the below list was sorted using Merge sort algorithm, show the content of ist step-by-step. 3. If the above list was sorted using Quick sort algorithm, show the content of ist after the first function call index= partition(list, 0, 7)1s executed, and gue the values of index and pivot as the middle value.arrow_forward
- Because that one number must be in the proper place, the selection sort method may be changed to terminate when the unsorted portion of the list includes only one number. Demonstrate that this change has no impact on the number of comparisons necessary to sort an n-element list.arrow_forwardplease make sure handwriting is clear and legible. please show steps 1-7: minLocation, maxLocation, middleLocation, and middleValue for each step. thank youarrow_forwardSort the list “A, L, G, O, R, I, T, H, M” in alphabetical order by Selection sort .arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education