60 likes | 237 Views
Epic programming. MAA. Marshall Capps, Alvin Cheung, Anh Ho. Mission. It already has your programming assignment in it. Implemented – Tree (recursive data structure) in H--. Built in functions. Infix – returns infix order of nodes in tree Prefix – returns prefix order of nodes in tree
E N D
Epic programming MAA Marshall Capps, Alvin Cheung, Anh Ho
Mission • It already has your programming assignment in it. • Implemented – Tree (recursive data structure) in H--
Built in functions • Infix – returns infix order of nodes in tree • Prefix – returns prefix order of nodes in tree • Size – returns the total number of nodes • Height – returns the height of the tree • Add – adds a new node to the tree, returns true if it added successfully • Remove – removes node from the tree, returns true if it removed it successfully • Contains – returns true if a node exists in the tree • Root – returns the root of the tree • Lchild – returns the left child of the current node • Rchild – returns the right child of the current node • Max – returns the max value in the tree • Min – returns the min value in the tree
Forests are good for: • Faster searching • Faster indexing • Faster storing • Big O(log(n))