BinarySearchTrees icon indicating copy to clipboard operation
BinarySearchTrees copied to clipboard

AVL delete too many break statements

Open dmcmanam opened this issue 8 years ago • 1 comments

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

dmcmanam avatar Nov 03 '17 23:11 dmcmanam

This might be useful for others who are looking to implement AVL trees thanks for pointing it out, I was not aware of that.

ignl avatar Jan 02 '18 12:01 ignl