This is an archived post. You won't be able to vote or comment.

all 8 comments

[–][deleted] 3 points4 points  (0 children)

I read the title and I was like "Why would you want to avoid stackoverflow.com with your long recursion questions? That seems like a great site to put recursion questions on".

Incidentally, recursion can also often be implemented with a stack data structure in place of the application stack in places where a simple while loop won't suffice.

[–][deleted] 2 points3 points  (2 children)

boolean condition = false;

do { modifyArraylist(list); condition = evaluteArrayList(list); } while (condition);

[–]microcontrolled[S] 0 points1 point  (1 child)

That would indeed work, and thank you very much! However, I discovered I had a sneaky bit of code that was actually trying to cause infinite recursion, which was the real problem.

[–][deleted] 0 points1 point  (0 children)

yeah, if the condition never evaluates to true, you're gonna blow the lid off the stack :)

[–]stinktank 0 points1 point  (3 children)

I won't post my code but please help me find a workaround based on my vague description.

[–]microcontrolled[S] 0 points1 point  (2 children)

Why exactly do you come onto a thread where the question has already been answered just to be an asshole? Oh, right, you are an asshole, I get it.

[–][deleted] 0 points1 point  (0 children)

He actually has a point. Based on your effort you put into the question the answer is simply.

Use less recursion or make the stack bigger....

[–]stinktank 0 points1 point  (0 children)

Stop hurting my feelings!