Hi
I have a method that has a reference to a linked list and an int that is the value. I want to recursively call that value to count and return how often that value is in the linked list.
So, here is what I got:
public static int find(LinkedNode x, int value){
if (x.value != value){
return 0;
}
else{
return 1+ find(x.next, value);
}
}
is that right?