How do you REMOVE a node in an AVL TREE?

From: Nobody (nobody_at_cox.net)
Date: 12/26/04


Date: Sun, 26 Dec 2004 13:09:39 -0800

I've got a BinarySearchTree class written and working. Now I am deriving an
AVL Tree from it. I've got everything working except the RemoveNode
function. How does one remove a node from an AVL Tree? I know I need to
remove the node, but obviously the tree needs to remain balanced. Can anyone
help out with an algorithm/psuedo code of some sort. I'm writing a template
based version in C++ and the code written like that is generally hard to
read as are all the other samples I've seen on the internet :).



Relevant Pages