/BinaryTreeJS

This is a binary tree with a drawing of it in javascript

Primary LanguageJavaScript

BinaryTreeJS

This is a binary tree with a drawing of it in javascript

The methods for the tree are as follows: Tree.addValue(val), where this adds a value to the tree.

Tree.traverse() - This goes through the entire tree and also draws the circles for each node

Tree.find(val) - This looks for a value in the binary tree

Tree.showVal() - It outputs the values in the tree in ascending order