Question: . If the method has any parameters (i.e. inputs passed to the method), what are they and what does each one represent, in your own

 . If the method has any parameters (i.e. inputs passed to

. If the method has any parameters (i.e. inputs passed to the method), what are they and what does each one represent, in your own words? How will each parameter be used by the method? (An example of a parameter is that the method insert has one parameter thing of type T.) If the method has a non-void return value, what does it return, in your own words? If the method has no parameters and/or its return value is void, please state this fact in your answer. Here are the methods you will be filling in: public Decreaser insert (T thing){} 1. 2. void decrease(int loc){} 3. public T extractMin() {} 4. private void heapify(int where){} Here is a sample of an expected response for a method called selectionSort (not related to this assignment) that has the header public int[] selectionSort(int[] arr){} and whose goal is to perform a selection sort on an array of ints. Method: public int[] selectionSort(int[] arr) {} Parameters: arr: a l-dimensional array of ints that stores the inputs to be sorted. The method will read this input array multiple times) and write a sorted version of the inputs to a newly allocated output array. Return value: a new array containing the inputs in sorted order. Once you finish your responses for the methods listed, answer the following additional questions: 5. Which instance variable in the MinHeap class holds the actual contents of the heap? 6. Which method(s) will call heapify? 7. Why is the decrease method not private to the MinHeap class

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!