I\'m trying to write a simple method to count all the nodes in the linked list. I know there are 7 items in the linked list, but it is returning just 6 of them.
The end node will fail n.next != null but it is part the the LinkedList, so you should consider that. It sounds like you simply have an indexing error.