title: How to merge two BST's efficiently?
body: <p><strong>How to merge two binary search trees maintaining the property of BST?</strong></p>
  
  <p>If we decide to take each element from a tree and insert it into the other, the complexity of this method would be <code>O(n1 * log(n2))</code>, where <code>n1</code> is the number of nodes of the tree (say <code>T1</code>), which we have splitted, and <code>n2</code> is the number of nodes of the other tree (say <code>T2</code>). After this operation only one BST has <code>n1 + n2</code> nodes.</p>
  
  <p>My question is: can we do any better than O(n1 * log(n2))?</p>