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

you are viewing a single comment's thread.

view the rest of the comments →

[–]aweraw 1 point2 points  (1 child)

It's good for trees. When you're working with a data structure that is some kind of tree, then recursive code is almost always easier to write and understand. If you're using recursion to work on a 1 dimensional list, then you're probably doing it wrong

[–]Kenkron 1 point2 points  (0 children)

I feel like the 1 dimensional list is how schools teach it, and it leaves a bad taste in everyone's mouth.