Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 473 Bytes

File metadata and controls

30 lines (21 loc) · 473 Bytes

leetcode-ruby

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:

img