height of a tree in ruby code example
Example: height of a tree in ruby
def size
size=1
size [email protected] unless @lchild.nil?
size [email protected] unless @richild.nil?
size
end
def size
size=1
size [email protected] unless @lchild.nil?
size [email protected] unless @richild.nil?
size
end