public class Node {
public int data;
public Node next;
}
a. Write a method maxVal that accepts as parameter the reference to the head node of a linked list of integers. The method should return the largest value in the list. Assume that there are no duplicate data values in the list nodes.
b. What is the Big-O complexity of the method maxVal?