BinarySearchTrees
BinarySearchTrees copied to clipboard
AVL delete too many break statements
Great idea trying to re-use the same rebalancing code in the AVL delete algorithm but it will not correctly handle Fibonacci trees although this is probably very rare in practice. The AVL delete conditions are described here (there are two additional cases to handle compared to insert): http://adtinfo.org/libavl.html/Deleting-an-AVL-Node-Step-3-_002d-Update.html
This might be useful for others who are looking to implement AVL trees thanks for pointing it out, I was not aware of that.