Closed AlejandroLoutphi closed 3 months ago
To iterate over the list with a for loop, do
for (LinkedListNode<E> i = theListToIterateOver; i != null; i = i.getNext()) {
thing = i.getElt();
//do stuff with thing
}
Replace E with whatever type the list has
Done, see results in 2-box
New methods to be added: