Drawing a Binary Tree in Ruby & Perl

Posted on October 14, 2012. Filed under: Uncategorized | Tags: , , , , |

When I started learning Ruby last year I decided to implement a binary tree and some of its basic operations (insert, delete, walk, and search) just to get my feet wet on the language. Binary trees are a good exercise because you need to use several features of the language like conditional statements, loops, and classes while at the same time you are solving an interesting problem.

The original Ruby implementation
The Perl implementation

Liked it here?
Why not try sites on the blogroll...