title: Construct tree with pre-order traversal given
body: <p>A special type of tree is given where all leaves are marked with <code>L</code> and others are marked with <code>N</code>. Every node can have 0 or at most 2 nodes. The preorder traversal of the tree is given.</p>
  
  <p>Give an algorithm to build the tree from this traversal.</p>