The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Re: Recursion Help

I recommend taking it one step at a time, and tackle each of those methods.

If someone could show me how to do a couple of these

We are here to help you through this, but not to do it for you. Like I said, break the problem down and give them a try. If you struggle, post back with a precise question about the problem you are having.

Re: Recursion Help

I'm working on add(E newEntry) now. It seems like for each of the methods that I need to implement recursively, the private getNodeAt method is doing most of the "hard work." I can make getNodeAt recursive. Does making getNodeAt recursive make any other method that calls getNodeAt also recursive? It seems like if I make getNodeAt recursive, there's nothing really left to make the other ones recursive. Sorry if I didn't get the problem across clearly.

Re: Recursion Help

Surely if you have a method that uses recursion and you call it from the other methods that need that functionality, those methods are (indirectly) using recursion? Otherwise, you're going to end up duplicating the same recursive algorithm in every method, which is, frankly, stupid...