Question: Java Programming Write a program called TestFEMaxPQ that, for each of the lengths 1000, 2000, 4000, and 8000: Declares an Integer array of the given

Java Programming

Write a program called TestFEMaxPQ that, for each of the lengths 1000, 2000, 4000, and 8000:

Declares an Integer array of the given length

fills that array with randomly generated integer values

Declares and initializes an FEMaxPQ object

Inserts every value from the array into that priority queue

Empties the priority queue, that is, it calls the delMax method until no more values are in it

Prints out the size of the array and the value of the sink/swim loop counter of the priority queue

After that output, print the value n lg(n) for each of the above array lengths.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!