Skip to content

katebeavis/binary-search-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binary-search-tree

Binary search tree implemented in Ruby

Has the following functionality:

add

Builds the tree by adding nodes

min

Returns the node in the tree with the minimum value

count

Returns the amount of nodes in the tree

values

Returns an array of the values of all the nodes in the tree

sum

Sums the values of all the nodes in the tree

present

Returns true or false depending on whether the given node is present in the tree

search

Returns the node searched for if present

delete

Deletes the given node if present

Don't forget to rspec!

About

Binary search tree implemented in Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages