Create a java class for the max heap data structure


Part 1: The Heap Class

Create a Java class for the Max Heap data structure. Implement the heap as an array. You will needto keep track of the heap size with a private variable. Implement an adequate constructor and agetter method for the size.

Part 2 Insertion

Implement the insertion method as described in the slides. Make sure the method works properlyand that it can handle all situations (like when the capacity of the array is reached).

Part 3: Deletion

Implement the deletion method as described in the slides. Make sure it works properly and that itcan handle situations when the heap has 0, 1, or more elements.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create a java class for the max heap data structure
Reference No:- TGS02139057

Now Priced at $30 (50% Discount)

Recommended (95%)

Rated (4.7/5)