title: Binary Search Tree - Removing all ints greater than certain value
body: <p>I am trying to figure out how to remove all integers a such that <code>a &gt; b</code> where a is any element within the binary search tree and <code>b</code> is the threshold number that all elements in the BST are compared to. Thus far I have: </p>
  
  <pre><code>public treeRemoveGreater(int x, BinaryNode node) {
         if (node.element &gt; x) {
            //node.element accesses element of given node i.e. integer value
            remove(node.element);
         }
         else {
            //Traverse tree 
         }
  </code></pre>
  
  <p>My problem is figuring out how to traverse the tree accordingly. I know that there is an efficient manner about going about this because a full traversal of the tree is not needed necessarily, I am just unsure as how to proceed. </p>