Skip to content

Instantly share code, notes, and snippets.

View dougjohnston's full-sized avatar

Doug Johnston dougjohnston

View GitHub Profile
@dougjohnston
dougjohnston / binarytree.rb
Last active August 29, 2015 14:06 — forked from yuya-takeyama/binarytree.rb
Binary tree implemented in Ruby.
module BinaryTree
class Node
attr_reader :word, :count
attr_accessor :left, :right
include Enumerable
def initialize(word)
@word = word
@count = 1