title: Mirror Binary Search Tree
body: <p>This is a code that given a root of the binary search tree, is to create its mirror.</p>
  
  <pre><code>def mirror(root):
      if root is None:
          pass
      else:
          mirror(root.left)
          mirror(root.right)
          temp = root.left
          root.left = root.right
          root.right = temp
  </code></pre>
  
  <p>Firstly, is this code right and also is the recursion here supposed to first get to the leaves of the tree first and then switch the references when unwinding?</p>