title: Data Structures: Binary tree traversal
body: <p>Hi I'm a bit confused with this tree and need help in figuring out if I'm choosing the right answer.</p>
  
  <p>Tree :</p>
  
  <pre><code>  A
   / \
  B   C
     / \
    D   E
  </code></pre>
  
  <p>Lets do the traversal first:</p>
  
  <ol>
  <li>In-order    : BADCE </li>
  <li>Pre-Order   : ABCDE </li>
  <li>Post-Order  : BDECA</li>
  </ol>
  
  <p>Questions:</p>
  
  <ol>
  <li>Which of the following traversals yields BADEC?</li>
  </ol>
  
  <p>a. only in-order 
  b. only level order 
  c. only post-order 
  d. only pre-order 
  e. pre-order and level order 
  f. in-order and level order
  g. none of the above</p>
  
  <p>Answer g</p>
  
  <p>Which of the following is a post-order traversal of the BST?
  a. ACEDB
  b. ABDCE
  c. BDECA
  d. EDCBA
  e. BADCE
  f. BADEC
  g. one of the above</p>
  
  <p>Answer g</p>
  
  <p>Can someone please confirm if I have done the traversal correctly and have chosen the correct answer for both question. </p>
  
  <p>Thanks</p>