DEV Community

dm
dm

Posted on

Updating balance factor in AVL tree after rotation - what am I doing wrong?

I am working on implementing an AVL tree in c++, and am familiar with the concepts of single and double rotation. I have implemented the tree successfully by calculating balance_factor = height(left_child) - height(right_child), and trying to implement a more efficient AVL tree by storing its balance factor and

Top comments (0)