title: Recursively add 1 to all nodes in a BST except node with SMALLEST data
body: <p>I'm trying to add +1 to every node's data except the node with the smallest number. So far, my implementation is not going correctly, I'm getting lost in the recursive calls. My code is adding incorrectly in some situations and not adding when necessary. I understand to find the smallest piece of data, we go to the node connected all the way left (8) in this case, am I missing certain test conditions?</p>
  
  <pre><code>Given a data set: 8, 14, 24, 29, 31, 35, 46, 58, 62,85, 95
  
  Expected results: 8, 15, 25, 30, 32, 36, 47, 59, 63, 86, 96
  Actual results: 9, 14, 25, 29, 32, 36, 46, 59, 63, 85, 96
  
  struct node
  {
  
   node * left;
   node * right;
   int data;
  
  };
  
  int add1(node * root) 
  {
  
      if(!root) return 0;    
      add1(root-&gt;left); //go left
  
      if(!root-&gt;left)  { //if left is NULL
          if(root-&gt;right) //check if there is a right child
              add1(root-&gt;right); //go to that node
          else
              return 0;
      }
  
      root-&gt;data += 1;    //add 1 to node
      add1(root-&gt;right); //go right
  
  return 1;
  }
  
  int main()
  {
  node * root = NULL;
  build(root); //inserts data set into our tree
  
  display(root);
  add1(root);
  display(root);
  
  return 0;
  
  }
  </code></pre>