title: How do you iteratively count nodes in a BST (C++)?
body: <p>I already know how to implement this function recursively. This is what I have:</p>
  
  <pre><code>int nodeCount(node *root){
      if(root == NULL)
          return 0;
      return 1 + nodeCount(root-&gt;left) + nodeCount(root-&gt;right);
  }
  </code></pre>
  
  <p>I would now like to perform a node count without recursion.</p>