# Computer Science Assignment | Custom Assignment Help

Your program is to first take as input 2 values: n indicates the number of values to be sorted, and k indicates the number of values to store in each heap. You may assume that n is a multiple of k. The program should then read a set of n integer values each of which is in the range 1..n.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.

The program should represent the k values in each heap as an array. Create a min-heap from the first k values in the input list, a second min-heap from the next k values, etc. Note that because n is a multiple of k, the last heap also contains exactly k values. You should use the most efficient method to create each of these heaps. Join the heaps together in a linked list, so that the 1st heap points to the 2nd, etc.

Now apply a radix sort on the heaps, as follows:

⦁ Each individual data item in the heap should be considered a “digit” for the purposes of the radix sort. Therefore a heap of k values can be considered to have k digits. There are n possible values for each of these digits.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.

⦁ At the end of the radix sort, the first heap in the linked list will be the “lowest” heap, the second will be the next “lowest”, etc.

Now repeatedly apply the following steps until the list of heaps is empty:

⦁ Remove the smallest item from the first heap, and print it. Replace this item with the smallest item from the second heap and apply trickle-down as necessary.

⦁ Repeat this process, inserting the smallest item from the third heap into the second heap, …, the smallest item from the last heap into the next-to-last heap.

⦁ When the last heap becomes empty, remove it from the linked list of heaps.

Part A (70 marks): Submit the results of running your program on the input in the following files, available from the course home page: assn3input1.txt, assn3input2.txt

For each of the above, print the initial list of values, and then print the item removed and the remaining data structure (i.e. “list of heaps”) as each item is removed, in a manner similar to the example shown on the following page.

Part B (20 marks): For this part, you must first construct a random sequence of integer values, with all values in the range 1..10000. This same random sequence must be used to compare the performance of your program for all of the following runs:

(n = 10000, k = 10000), (n = 10000, k = 1000), (n = 10000, k = 100), (n = 10000, k = 10), (n = 10000, k = 1).

You should provide the following information for each run: execution time, total swaps required by trickle-down during initial construction of the heaps, and total swaps required as a result of a remove operation. Note: you can check the current time in milliseconds using System.currentTimeMillis().

Alternatively, you can investigate System.nanoTime(). Submit the results of this comparison, and write a short paragraph commenting on the results and what you think they mean.

For this part, the sorting output should be given electronically only, and should consist of only n, k, the initial list of items and the sorted list of items.

Calculate the price
Pages (550 words)
\$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Homework Writing Services
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Use Grammarly on all your papers.
Customer 459947, March 28th, 2022
Technology
Good job after revision. Make Grammarly your tool.
Customer 462769, March 29th, 2022
History
Outstanding clarity.
Customer 456665, April 21st, 2022
Psychology
GOOD REVISION.
Customer 462815, April 20th, 2022
Military
good job
Customer 456821, October 20th, 2022
Psychology
Good work.
Customer 462579, June 4th, 2022
Although my order was not delivered at my requested time due to issues with email, the material received was great.
Customer 454605, June 19th, 2020
I got a B on the paper. Which is okay. But would of preferred an A paper since I paid a bit more for better writing.
Customer 454445, June 2nd, 2020
Education
nice
Customer 463813, March 10th, 2023
Discrete Mathmatics
Be keen on instructions.
Customer 462387, March 30th, 2022
Logistics
As I expected.
Customer 460551, November 23rd, 2021
Other
Instructions followed.
Customer 462823, April 13th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend