Skip to content

Instantly share code, notes, and snippets.

View ashishmd's full-sized avatar

Ashish Muralidharan ashishmd

View GitHub Profile
@ashishmd
ashishmd / binary_tree.rb
Last active July 2, 2020 14:57
Create a binary tree from an array in ruby
# 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