Programming Question

Question 1 (25 pts):Assume the following list of keys:
52, 7, 92, 28, 70, 49, 86, 33, 63, 25, 15
This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the
middle element of the list, and fill in the blank squares below.
Question 2 (25 pts):
Assume the following list of keys:
30, 45, 1, 26, 90, 5, 85, 35, 20, 41, 38, 72, 11, 33, 49
This list is to be sorted using the merge sort algorithm as discussed in this chapter. Fill in the blank
squares below.
Question 3 (25 pts):
Assume the following list:
30, 45, 1, 26, 90, 5, 85, 35, 20, 41, 38, 72, 11, 33, 49
(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 class provided (arrayListType.h). Ask the user to enter a list of positive integers ending
with -999, sort the integers, and display the pivots for each iteration and the sorted array.
Submit the source code, and copy and paste the screenshot of the output here.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order

Order your essay today and save 30% with the discount code ESSAYHELP