I\'m studying for an exam, and this is a problem from an old test:
We have a singly linked list with a list head with the following declaration:
clas
Here's a hint, you have a graph of nodes in the linked list, and you always keep a reference to head which is the first node in the linkedList. next points to the next node in the linkedlist, so when next is null you are at the end of the list.