title: How to print the numbers bewteen a specific range in BST from highest to lowest with least nodes visited?
body: <p>For a BST, I want to find the nodes' values in [a,b] form largerest value to smallest one. The simplest way I can think is as follows:</p>
  
  <pre><code>void printRange(BSTNode&lt;Key,E&gt;* root,int lowValue,int highValue) const
  {
      if(root==NULL) return;
  
      printRange(root-&gt;right(),lowValue,highValue);
      if(root-&gt;key()&gt;=lowValue&amp;&amp;root-&gt;key()&lt;=highValue)
          cout&lt;&lt;root-&gt;key()&lt;&lt;" ";
  
      printRange(root-&gt;left(),lowValue,highValue);
  }
  </code></pre>
  
  <p>But I want to know whether there is a way to print out these values with less nodes visited?</p>