lib/splay_tree.rb
#
# do not insert val if already in the tree!
#
do not insert val if already in the tree!
do not insert val if already in the tree!
def insert(val, root=@root, splay=false)
      node, link, found = _search(val, root)
       may change the root of the tree:
      _create_node(val, node, link) unless found
      _splay(root, node) if splay
    end
def insert ( val , root = @root , splay = false ) node , link , found = _search ( val , root ) _create_node ( val , node , link ) unless found _splay ( root , node ) if splay end
do not insert val if already in the tree!
do not insert val if already in the tree!
# # may change the root of the tree:
val
<not_specific>
root
<not_specific>
splay
<not_specific>