Display data from a linkedList with recursion
843789Aug 25 2009 — edited Aug 26 2009I am working on a project and I am stuck when it comes to the recursion part. I was wondering if someone could post a simple example that would help me. What I am trying to do is use the LinkedList class to store some Data. Lets say I have A, B, C, D stored in my linked list. So I want to use recursion to print all the items in the list.
A
B
C
D
or
A
C
B
D
I already have the linked list set up and the user can add as many items to it as they want, all that works, just the recursion part is killing me. When I search online I get a bunch of examples how to calculate power and stuff like that, I can't really find a example close to what I am trying to do. Can someone post some pseudocode or even a real code example to get me started on how to accomplish this?