Created as part of The Odin Project curriculum.
View on Github
This is the binary search tree (BST) project, in which I create a balanced BST.
Method | Description |
---|---|
#build_tree | Turns an array of data into a balanced binary tree full of Node objects appropriately placed |
#insert | Adds a new node containing a particular value |
#delete | Removes that new node, containing a particular line |
#find | Returns the node with the given value |
#inorder | Traverse the tree in 'inorder' |
#preorder | Traverse the tree in 'preorder' |
#postorder | Traverse the tree in 'postorder' |
This was a good one! By the end of it, I felt much better about recursion. It was also a good exercise in deciphering non-ruby programming languages, reading them like pseudocode, and expressing the logic in ruby. And binary search trees certainly made much more sense by the end of it.
God bless.
-Niko Birbilis