notes howeversuppose now try to insert waluigi get the following treeeunice fred binky baby daisy calista ahmed luther daisy waluigi traveling from the new node to the rooti see that fred violates the balance condition it' left child has height of - and its right child has height of have to rebalance the tree rebalancing when rebalancei have node whose height is hthat has two children of differing heights one child has height of - and the other has height of - the one whose height is - contains the new node we have to consider two caseswhich 'll name zig-zig and zig-zag you'll see the reasons for the names pretty clearly here is the zig-zig caseh - - - either is the newly added nodeor it is node or - - or - - or - in this casethe path from the imbalanced node (bto the newly added node starts with two right children to rebalance the treeyou perform rotation about node dd - - - - - - or - - or - lovely professional university