Binary Search & Balanced Trees

Answer & solution
Answer: B: 3 (no official key was published)
The insertion increases the height of the subtree rooted at g by one. That increase propagates through c, b and a. At c, its already taller g side becomes two levels taller than its empty opposite side. The same extra level makes b and then a have height difference two. Node g itself has only one new child, so its balance magnitude is one; e and its descendants are unchanged. Thus c,b,a are the three unbalanced nodes before rotations. Counting after AVL repair would answer a different question.