Class: DSA::BinarySearchTree::Node
- Inherits:
-
Struct
- Object
- Struct
- DSA::BinarySearchTree::Node
- Defined in:
- lib/dsa-ruby/binary_search_tree.rb
Overview
Internal node structure for the binary search tree.
Instance Attribute Summary collapse
-
#left ⇒ Node?
The left child node.
-
#right ⇒ Node?
The right child node.
-
#val ⇒ Comparable
The value stored in the node.
Instance Attribute Details
#left ⇒ Node?
Returns the left child node.
25 |
# File 'lib/dsa-ruby/binary_search_tree.rb', line 25 Node = Struct.new(:val, :left, :right, keyword_init: true) |
#right ⇒ Node?
Returns the right child node.
25 |
# File 'lib/dsa-ruby/binary_search_tree.rb', line 25 Node = Struct.new(:val, :left, :right, keyword_init: true) |
#val ⇒ Comparable
Returns the value stored in the node.
25 |
# File 'lib/dsa-ruby/binary_search_tree.rb', line 25 Node = Struct.new(:val, :left, :right, keyword_init: true) |