I am trying to figure out the rotation in a Red Black tree while its rebalancing is done. I understand why rotation is occurring but I don't get how it is being done. Also, what intermediate rotations like LL, RR , LR and RL are done to reach till the result and I would also appreciate if someone tells me any rule of thumb as to when to do any one of these rotation. Here is the rotation:
Rr(2) is the case when black node deficiency is in right child of "py" i.e.
"y" and grandchild of "v" are 2 red nodes i.e. "b" and "x"