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