Module compt::dfs_order

source ·
Expand description

A complete binary tree stored in a Vec laid out in dfs in order. One advantage of using the dfs order over the bfs order, is that at any point during traversal of the tree, you can turn the visitor into a slice representing the rest of the nodes underneath that visitor.

Structs

Complete binary tree stored in DFS inorder order. Height is atleast 1.
Container for a dfs order tree. Internally uses a Vec. Derefs to a CompleteTree.
Pass this to the tree for In order layout
Error indicating the vec that was passed is not a size that you would expect for the given height.
Pass this to the tree for post order layout
Pass this to the tree for pre order layout
Tree visitor that returns a reference to each element in the tree.
Tree visitor that returns a mutable reference to each element in the tree.