3 ms·
I think it's rather universal that, for instance, a depth-first tree traversal is best done recursively. In my experience, I almost always prefer recursion sin
by tel 11y ago
I think it's rather universal that, for instance, a depth-first tree traversal is best done recursively.
In my experience, I almost always prefer recursion since it allows me to work more closely with the structure of the original data that I'm interested in instead of a set of a proxy indices which I have to track separately.