Question: Add a method size to our implementation of the LinkedList class that computes the number of elements in the list by following links and counting
Add a method size to our implementation of the LinkedList class that computes the number of elements in the list by following links and counting the elements until the end of the list is reached.
Step by Step Solution
3.52 Rating (162 Votes )
There are 3 Steps involved in it
Sure in order to add a size method to a LinkedList class you need to iterate over the entire list st... View full answer
Get step-by-step solutions from verified subject matter experts
