Maybe not the best forum to ask this, but I have a question about this part in the AVL tree section:
def put(self, key, value):
newroot = BalancedBSTNode.put(self, key, value)
update(newroot)
return newroot.rebalance()
I've never seen this design pattern before... is this called something? Like "recursive inheritance"? I think it's awesome and also a little mind bending. I would have never thought about extending recursive methods like this...
Maybe not the best forum to ask this, but I have a question about this part in the AVL tree section:
I've never seen this design pattern before... is this called something? Like "recursive inheritance"? I think it's awesome and also a little mind bending. I would have never thought about extending recursive methods like this...