FOR JAVA
Consider rewriting the method max() given below such that it gives the correct answer even if the linked list contains positive and/or negative integers on their .item variable.
public int max(Node x) {
intmaxValue=0;
while(x!=null){
if(x.item<>
x=x.next;
}
returnmaxValue;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here