u/flebronin r/compsci • Recommends
On “[CS1] Understanding Rebalancing AVL Trees”
The balancing factor of a node is not something you chose. It is just the difference between the heights of your left and right subtree.
For more information on AVL trees, you can look at Introduction to Algorithms, MIT Press. You can look at insertion procedures in https://www.cs.usfca.edu/~galles/visualization/AVLtree.html , and a video about AVL trees at link to this video