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

Creating and Submitting your Portfolio Overview Creating a professional cybersecurity portfolio is essential for showcasing your skills, achievements, an

Creating and Submitting your Portfolio Overview Creating a professional cybersecurity portfolio is essential for showcasing your skills, achievements, and growth. This portfolio will serve as a valuable tool for presenting yourself to universities, scholarship committees, employers, and beyond. Objective:: To design a professional cybersecurity portfolio that markets your academic and

Hello Students, As discussed in class, the Workspaces and Challenges are now active. Required Challenges for Full Credit To earn full credit (30% of the

Hello Students, As discussed in class, the Workspaces and Challenges are now active. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 8 challenges from the following list: Interns & HR on the Domain Controller Help Desk Fun: User Workstation Nightmares Dangerous Drives Preventative Protection: Thwarting the Imminent Threat Security

Please read the instructions below carefully. Required Challenges for Full Credit Vulnerability Scan Complete, Begin System Hardening [NG] Volatile

Please read the instructions below carefully. Required Challenges for Full Credit Vulnerability Scan Complete, Begin System Hardening [NG] Volatile Vulnerabilities [NG] The Network is Down! Internal Issues Edition [NG] The Network is Down! Contractor Edition [NG] (Complexity 1) The Network is Down! Contractor Edition [NG] Systems Security Analyst Crash Course

Hello Students, Please pay attention to the instructions below. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must

Hello Students, Please pay attention to the instructions below. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 6 challenges from the following list: Interns & HR on the Domain Controller Help Desk Fun: User Workstation Nightmares Dangerous Drives Preventative Protection: Thwarting the Imminent Threat Security