Re:Tree traversal without recursion: the tree as a state mac...
by usrusr on Tuesday September 03, 2019 @05:19AM
(#20864874)
I was confused by that as well before reading the answers: the confusion stemmed from only thinking about the linear traversal or search use cases, where an ordered array plus binary search is all you'd ever need for reading. But when the tree shape itself is still needed, indices can be better than pointers, particularly when adding sidecar arrays for extension or as temporary scribble space (see sibling comment).
[ Parent
| on HN ]
There are no comments on this comment yet.