MCPcopy Create free account
hub / github.com/douchuan/algorithm / postorder_recursive

Function postorder_recursive

tests/test_tree_traverse.rs:124–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122
123#[test]
124fn postorder_recursive() {
125 let nodes = vec!["1", "#", "2", "3"];
126 let tree: Tree<usize, usize> = TreeBuilder::build_in_level(nodes.as_slice());
127 let r = unsafe { PostOrderVisitor::recursive(&tree) };
128 assert_eq!(vec![3, 2, 1], r);
129}
130
131#[test]
132fn postorder_iter() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected