title: Inorder tree traversal: Which definition is correct?
body: <p>I have the following text from an academic course I took a while ago about inorder traversal (they also call it pancaking) of a <strong>binary tree</strong> (not BST):</p>
  
  <p><em>Inorder tree traversal</em></p>
  
  <blockquote>
    <p>Draw a line around the outside of the
    tree. Start to the left of the root,
    and go around the outside of the tree,
    to end up to the right of the root.
    Stay as close to the tree as possible,
    but do not cross the tree. (Think of
    the tree — its branches and nodes — as
    a solid barrier.) The order of the
    nodes is the order in which this line
    passes underneath them. If you are
    unsure as to when you go “underneath”
    a node, remember that a node “to the
    left” always comes first.</p>
  </blockquote>
  
  <p>Here's the example used (slightly different tree from below)</p>
  
  <p><img src="https://farm4.static.flickr.com/3661/3624141531_094985f47e_o.png" alt="tree 1"></p>
  
  <p>However when I do a search on google, I get a conflicting definition. For example the <a href="http://en.wikipedia.org/wiki/Tree_traversal" rel="nofollow noreferrer">wikipedia example</a>:</p>
  
  <p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/67/Sorted_binary_tree.svg/250px-Sorted_binary_tree.svg.png" alt="Tree definition"></p>
  
  <blockquote>
    <p>Inorder traversal sequence: A, B, C,
    D, E, F, G, H, I
    (leftchild,rootnode,right node)</p>
  </blockquote>
  
  <p>But according to (my understanding of) definition #1, this should be</p>
  
  <blockquote>
    <p>A, B, D, C, E, F, G, I, H</p>
  </blockquote>
  
  <p><strong>Can anyone clarify which definition is correct?</strong> They might be both describing different traversal methods, but happen to be using the same name. I'm having trouble believing the peer-reviewed academic text is wrong, but can't be certain.</p>