title: Rotating a tree in Java
body: <p>I am trying to rotate my tree in java.
  Say I have the tree below and I want to rotate left or right around node 2.  I have tried googling it, but what I really need is a step by step guide on the operations needed to preform the rotation, etc (1. set left child to x), it does not need to be in code.
  If anyone would care to explain, or have a page that does this I would be forever thankful.</p>
  <p><img src="https://i.stack.imgur.com/qMEDU.gif" alt="tree example" /></p>