Question 1 (25 pts):Assume the following list of keys:49, 4, 89, 25, 67, 46, 83, 30, 60, 22, 12This list is to be sorted using the quick sort algorithm a

Question 1 (25 pts):Assume the following list of keys:49, 4, 89, 25, 67, 46, 83, 30, 60, 22, 12This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middleelement of the list, and fill in the blank squares below.pivotpivot pivotpivot pivot pivot pivotpivot pivotpivot pivot49, 4, 89, 25, 67, 46, 83, 30, 60, 22, 12Question 2 (25 pts):Assume the following list of keys:32, 47, 3, 28, 92, 7, 87, 37, 22, 43, 40, 74, 13, 35, 51This list is to be sorted using the merge sort algorithm as discussed in this chapter. Fill in the blank squaresbelow.32, 47, 3, 28, 92, 7, 87, 37, 22, 43, 40, 74, 13, 35, 51Question 3 (25 pts):Assume the following list:32, 47, 3, 28, 92, 7, 87, 37, 22, 43, 40, 74, 13, 35, 51, 14, 26, 5(a) Using the function buildHeap as given in this chapter, convert the list into a heap.(b) Show the resulting list after three passes of heapsort. (Use the heapify procedure as given in this chapter.)One pass:Two passes:Three passes:Question 4 (25 pts):Modify the quick sort implementation in the textbook to sort the array using pivot as the median of the first, last,and middle elements of the array. Add the modified quick sort implementation to the arrayListType classprovided (arrayListType.h). Ask the user to enter a list of positive integers ending with -999, sort the integers, anddisplay the pivots for each iteration and the sorted array.Submit the source code, and copy and paste the screenshot of the output here

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

How does Rupa Huq’s argument in “Rethinking Subculture” relate to Dick Hebdige’s understanding of subculture, as explained by Huq? Explain how Hebdige or

How does Rupa Huq’s argument in “Rethinking Subculture” relate to Dick Hebdige’s understanding of subculture, as explained by Huq? Explain how Hebdige or Huq’s understanding of style relates to how youth express identity and community today. Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:”Table

Week8_Test Plan Instructions: The Test Plan for each project includes the Pseudocode, Flowchart, Goals and Objectives, Functional Requirements, and Test

Week8_Test Plan Instructions: The Test Plan for each project includes the Pseudocode, Flowchart, Goals and Objectives, Functional Requirements, and Test Matrix including Actual Output column.  Below the table are screenshots verifying the actual output for each case. Note:  Your programming projects should be submitted in the Revel environment for grading. Week

Week 4: Instructions: The Test Plan for each project includes the Pseudocode, Flowchart, Goals and Objectives, Functional Requirements, and Test Matrix

Week 4: Instructions: The Test Plan for each project includes the Pseudocode, Flowchart, Goals and Objectives, Functional Requirements, and Test Matrix including Actual Output column.  Below the table are screenshots verifying the actual output for each case. Week 4 Notes – Mathematical Functions;  Characters and Strings Recalling our Week 3