Exemple #1
0
 def remove(self, key):
     newroot = BalancedBSTNode.remove(self, key)
     return newroot.rebalance() if newroot else None
Exemple #2
0
 def put(self, key, value):
     newroot = BalancedBSTNode.put(self, key, value)
     return newroot.splayup(key)
Exemple #3
0
 def put(self, key, value):
     newroot = BalancedBSTNode.put(self, key, value)
     return newroot.rebalance()
Exemple #4
0
 def __init__(self, key, value):
     BalancedBSTNode.__init__(self, key, value)
     self._updateheight()