title: sum of nodes greater than a number in BST
body: <p>For a binary search tree structure in C that cannot be changed:</p>
  
  <pre><code>struct bstnode {
    int item;
    struct bstnode* left;
    struct bstnode* right;
  };
  
  struct bst {
    struct bstnode* root;
  };
  </code></pre>
  
  <p>How can we find the sum of values that are greater than a number(num)?<br>
  (we cannot travel the whole tree or convert this bst to an array).<br>
  the function declaration is:</p>
  
  <pre><code>int sum_greater(struct bst * t, int num)
  </code></pre>
  
  <p>Basically, my method is to use recursion:<br>
  when num equals item in the current node, we sum the right part of this tree.<br>
  when num greater than item in the current node and node->right is greater than num, we sum the right part of this tree.<br>
  But I dont know how to deal with the situation when current node is less than num.  </p>