title: Find and revert the swapped nodes in a binary search tree, time requires O(n) and space requires O(h) where h refers to tree depth
body: <p>for more detail about the <a href="https://stackoverflow.com/questions/19884029/find-the-swapped-nodes-in-binary-search-tree">question</a></p>
  <p>though it's easy to just swap two node's value in the bst, if it requires us to change node instead of its value, it is a little bit hard. <a href="https://stackoverflow.com/questions/20614575/how-to-swap-two-nodes-in-binary-tree">In this Post</a> author(Graham Asher) have list some situations, but it is not fully consider.</p>
  <p>Changing two nodes in a tree, we need to consider three question:</p>
  <ol>
  <li>is <code>node1</code> or <code>node2</code> the <code>head</code> of the tree?</li>
  <li>is <code>node1</code> father of <code>node2</code> or <code>node2</code> is father of <code>node1</code>?</li>
  <li><code>node1</code> and <code>node2</code> is <code>leftChild</code> or <code>rightChild</code></li>
  </ol>