MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / order

Function order

publication/code/chapter08/binary_tree.rs:379–399  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377 }
378
379 fn order() {
380 let mut bt = BinaryTree::new(10usize);
381 bt.insert_left_tree(2usize);
382 bt.insert_right_tree(18usize);
383
384 println!("internal pre-in-post-level order:");
385 bt.preorder();
386 bt.inorder();
387 bt.postorder();
388 bt.levelorder();
389
390 let nk = Some(Box::new(bt.clone()));
391 println!("outside pre-in-post-level order:");
392 preorder(nk.clone());
393 inorder(nk.clone());
394 postorder(nk.clone());
395 levelorder(nk.clone());
396
397 println!("internal exp: {}", bt.iexp());
398 println!("outside exp: {}", oexp(nk));
399 }
400}

Callers 1

mainFunction · 0.70

Calls 10

preorderFunction · 0.70
inorderFunction · 0.70
postorderFunction · 0.70
levelorderFunction · 0.70
insert_left_treeMethod · 0.45
insert_right_treeMethod · 0.45
preorderMethod · 0.45
inorderMethod · 0.45
postorderMethod · 0.45
levelorderMethod · 0.45

Tested by

no test coverage detected