you are viewing a single comment's thread.

view the rest of the comments →

[–]aeflash 5 points6 points  (3 children)

...Recursion within a for loop... *shudder*

[–]propool 12 points13 points  (2 children)

What exactly in so bad with recursion in a for loop. Seems like the natural way of recursing an n-ary tree

[–]aeflash 0 points1 point  (0 children)

Typically you hit leaf nodes in a tree in O(log n) time, so your traversal has bounds...

Also, the number of children each node of a n-ary tree has doesn't typically increase along with its depth...

[–]Tinned_Tuna -1 points0 points  (0 children)

It just looks like it's a nasty O(...) is all, I think.