title: Counting left-child nodes in a Tree
body: <p>I am supposed to implement a recursive method that counts the amount of left-child tree nodes. My code so far is:</p>
  
  <pre><code>private int countLeftNodes(IntTreeNode node){
      int c = 0;
      if (node != null){
          c = 1 + countLeftNodes(node.left);
          countLeftNodes(node.right);
      }
  
      return c;
  }
  </code></pre>
  
  <p>It returns a number much smaller than what it should be. I have a feeling that my traversal is off because it seems to only count the very left child nodes, and then terminates. When I call this method on an IntTree of size 16 I should get 8 left-child nodes, 7 right-child nodes, and one root, but instead I get 4 left-child nodes.</p>