Count Nodes in Linked List
Your will be given the head node of a linked list. Return the number of nodes in the list.

Assume the node class is defined as as:
public abstract class SinglyLinkedNode{ public boolean hasNext(); public T getData(); public SinglyLinkedNode getNext(); }


Answers are hidden from search engines.
data-structure lists coding