I need to add a node at the front of the linked list using recursion.
Below is the add method I'm trying to implement. I could only figure out how to add it at the back of the linked list :(
public void add(E element)
{
Node<E> newNode = new Node<E>(element, null);
if (this.next == null)
{
this.next = newNode;
} else {
next.add(element);
}
}