subject
Engineering, 19.05.2021 20:00 alaj8600

Java code Implement MaxHeap sort algorithms on your computer. Run timings for each algorithm
on arrays of size n = 10i

for i ranging from 1 to as large a value as your computer’s

memory and compiler will allow. Implement the given algorithms in Java-Generic-
Programing, which provide the following menu

1. Insert
2. Delete
3. Search
4. Print ( sorted array , the array size and sort time to the screen)
5. Quit
Then you need to answer the following questions :
 Use the findings that are computed by your program to produce an analysis
document containing a discussion and plots (you’ll plot execution time vs n)
showing the performance of the given algorithms as n (the length of the input
array) changes.
 Then modify your findings by count and print the number of comparisons. This
should be reported as a third column in your output to the screen. Then you need
to discuss your findings in the analysis document.
(Hint: you can use the following segment of code to obtain the execution time and don’t forget to
include #include into your program)
time_t start, end;
double dif;
time (&start); /*Get the current calendar time as a time_t object.*/
// perform the task;
time (&end); /*Get the current calendar time as a time_t object.*/
dif = difftime (end, start); /* Calculates the difference in seconds as a floating point double

between time1 and time2.*/

printf ("It took you %.2lf seconds \n", dif );

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
If the thermal strain developed in polyimide film during deposition is given as 0.0044. assume room temperature is kept at 17.3 c, and thermal coefficient of expansion for the film and the substrate are 54 x 10^-6c^-1 and 3.3 x 10^-6c^-1respectively. calculate the deposition temperature.
Answers: 3
question
Engineering, 04.07.2019 19:10
Ahelical coil spring has a mean diameter of 50 mm, a wire diameter of 5.5 mm and is wound with a pitch of 10 mm. the spring steel has an ultimate strength of 1250 mpa. find the force needed to compress the spring solid and the wire stress in this condition. state whether the spring will return to its initial length.
Answers: 1
question
Engineering, 04.07.2019 19:10
Agas contained within a piston-cylinder assembly e end nation about same energy states, 1 and 2, where pi 10 bar, v undergoes two processes, a and b, between the sam 0.1 m3, ui-400 kj and p2 1 bar, v2 1.0 m2, u2 200 kj: process a: process from 1 to 2 during which the pressure- volume relation is pv constant process b: constant-volume process from state 1 to a pressure of 2 bar, followed by a linear pressure-volume process to +20 0 state 2 kinetic and potential energy effects can be ignored. for each of the processes a and b, (a) sketch the process on p-v coordinates, (b) evaluate the work, in kj, and (c) evaluate process the heat transfer, in kj
Answers: 2
question
Engineering, 04.07.2019 19:20
Apure substance is a)-mixture of various chemical elements or compounds b)-substance that has a fixed chemical composition throughout c)-mixture that is homogeneous (such as air) d)-all the answers
Answers: 3
You know the right answer?
Java code Implement MaxHeap sort algorithms on your computer. Run timings for each algorithm
...
Questions
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Biology, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Biology, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
question
Social Studies, 16.09.2020 18:01
question
Mathematics, 16.09.2020 18:01
Questions on the website: 13722361