This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby program to create binary tree from array of numbers | |
# Class Node to store value, left node and right node | |
class Node | |
attr_accessor :value, :left, :right | |
def initialize(value = nil) | |
self.value = value | |
end | |
end |