bin+lib the_one

This is a simple bst crate, created as a project for class

1 unstable release

0.1.2 Mar 15, 2024

MIT/Apache

21KB
442 lines

Find is called by a tree and inputs a key. returns true if the key is in the node.

let mut tree = BinTree{..Default::default()};
tree.add_node(Node{val:14});
tree.add_node(Node{val:15});
tree.add_node(Node{val:13});
asserteq!(tree.find(17,false));
assert!(tree.find(14));

Dependencies

~310KB