Minitest is used for unit test
gem install minitest
Ruby-Graphviz library needs to be installed in order to use drawTree() function
Source at: https://github.com/glejeune/Ruby-Graphviz
gem install graphviz
gem install ruby-graphviz
For a binary tree, like below
1
/ \
2 3
\
4
the function will generate a png file in the same directory as below: