Guest User

Untitled

a guest
Jul 16th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1.     public int count(E o){
  2.    
  3.         int numNodes = 0;
  4.         LLNode nodeToCount = head;
  5.        
  6.         while (nodeToCount.next != null){
  7.            
  8.             numNodes++;
  9.             nodeToCount = nodeToCount.next;
  10.            
  11.         }
  12.        
  13.         return numNodes;
  14.    
  15.     }
Add Comment
Please, Sign In to add comment