Take out a piece of paper. We’ll be programming on paper.
public class LinkedList<E> { private LinkedNode<E> head; int size; public String toString() { // your code } }
Use a recursive helper method.
What is the base case?
How do we make the problem smaller?