Question: Optional Extra Credit (10 points) Find the maximum value in a List and move that value to the front of the list. The method
Optional Extra Credit (10 points) Find the maximum value in a List and move that value to the front of the list. The method header is: public static void prioritizeMaximumValue(List numberList) Notes: If there is more than one copy of the maximum, you can move any one of those copies to the front. Because there is more than one right answer here, the driver program does not include tests for this. I suggest adding your own tests. You are not swapping values- but performing a shift by moving the maximum value to the front of the list. For Full Credit: Take advantage of the methods provided in List rather than rewriting code to do the same task. . Your code should not crash with empty lists or one-element lists. Do not use another data structure, such as ArrayList or an array. Question 45 Paste your complete prioritizeMaximumValue method here. Edit View Insert Format Tools Table 12pt Paragraph BIUA 0 pts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
