data-structures-and-algorithms

data-structures-and-algorithms

View on GitHub

Trees

Features

the following additional methods:

Add Arguments: value Return: nothing Adds a new node with that value in the correct location in the binary search tree. Contains Argument: value Returns: boolean indicating whether or not the value is in the tree at least once.

- Binary Tree

Create a Binary Tree class Define a method for each of the depth first traversals:

pre order in order post order which returns an array of the values, ordered appropriately. ```

solution

Algorithm____

Structure and Testing

[x] Can successfully instantiate an empty tree

[x] Can successfully instantiate a tree with a single root node

[x] Can successfully add a left child and right child to a single root node

[x] Can successfully return a collection from a preorder traversal

[x] Can successfully return a collection from an inorder traversal

[x] Can successfully return a collection from a postorder traversal

Big O___

whiteboard proces