-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently, we only provide pre-order tree traversal, which applies the function from the root to the leaves. We should also provide the reverse, applying the function to the leaves first and then going to the root.
See: AbstractTrees.PreOrderDFS and AbstractTrees.PostOrderDFS.
I propose that we re-export those two and that users provide them as an argument to the tree traversal. The only thing we have to change is when we call the function in the traversal:
- before recursion on the children for PreOrderDFS
- after recursion for PostOrderDFS
Metadata
Metadata
Assignees
Labels
No labels