title: How does the recursion preorder traversal algorithm go back to parent?
body: <pre><code>public static void preorder(Node root) {
      if(root == null) return;
  
      root.printValue();
      preorder(root.getLeft());
      preorder(root.getRight());
  }
  </code></pre>
  
  <p>I have tried to go through this function numerous times but i still can't figure out how after traversing through all the left children the algorithm goes back to the nearest ancestor(parent). Could someone explain this to me. </p>