Question: list ) 2 . 1 2 LAB: Find max in list Given the IntNode class, define the findMax ( ) method in the CustomLinkedList class

list)2.12 LAB: Find max in list
Given the IntNode class, define the findMax() method in the CustomLinkedList class that returns the largest value in the list or returns -99 if
the list is empty. Assume all values in the list are non-negative.
Ex: If the list contains:
head ->14->191->186->181
findMax(headObj) returns 191.
Ex: If the list contains:
head
findMax(headObj) returns -99.
571658.2501028.q3zqy7
LAB
ACTIVITY
2.12.1: LAB: Find max in list
010
Current file: CustomLinkedList.java
Given main() in the ShoppingList class, define an insertAtEnd() method in the ItemNode class that adds an element to the end of a
linked list. DO NOT print the dummy head node.
Ex. if the input is:
4
Kale
Lettuce
Carrots
Peanuts
where 4 is the number of items to be inserted; Kale, Lettuce, Carrots, Peanuts are the names of the items to be added at the end of the list.
The output is:
Kale
Lettuce
Carrots
Peanuts
571658.2501028.q3zqy7
LAB
ACTIVITY
2.11.1: LAB: Grocery shopping list (linked list: inserting at the end of a list)
File is marked as read only
Current file: ShoppingList.java
list ) 2 . 1 2 LAB: Find max in list Given the

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 Programming Questions!