|
|
|
|
|
by xelxebar
376 days ago
|
|
Well the whole point is to use a breadth first order here. I don't think there's a depth vector analogue for breadth first traversals. Is there? But, indeed, depth vectors are nice and compact. I find them harder to work with most of the time, though, especially since insertions and deletions become O(n), compared to parent vector O(1). That said, I do often normalize my parent vectors into dfpo order at API boundaries, since a well-defined order makes certain operations, like finding leaf siblings, much nicer. |
|