class DSA::BasicBinarySearchTreeNode
A basic binary search tree node
Attributes
key[RW]
left[RW]
parent[RW]
right[RW]
value[RW]
Public Class Methods
new(key, value)
click to toggle source
# File lib/DSA/binary_search_tree.rb, line 5 def initialize(key, value) raise KeyError, 'Key cannot be nil' if key.nil? @key = key @value = value @parent = nil @left = nil @right = nil end