title: Print Binary search tree from biggest number to smallest using Java
body: <p>I need a way, <code>recursive</code> / <code>non recursive</code> to print BST from biggest to smallest number,
  Example : 
  for this tree 
  <a href="https://i.stack.imgur.com/RRucF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RRucF.png" alt="BST"></a> came threw the answer of how to print BST </p>
  
  <p>I would like to get : <code>25,20,16,15,10,9,8,6,4,3,2,1</code></p>
  
  <p>I know the way to print it opposite way : <code>(in order)</code></p>
  
  <pre><code>public void displaySmallToBig(Node root){ // inorder
     if(root!=null){
         displaySmallToBig(root.left);
         System.out.print(" " + root.data);
         displaySmallToBig(root.right);
     }
  }
  </code></pre>
  
  <p>Will print :  <code>1 2 3 4 4 6 8 9 10 15 16 20 25</code></p>
  
  <p>Thanks in advance 2 all the helpers.</p>
  
  <p>all the class : </p>
  
  <pre><code>package com.company;
  
  public class BinarySearchTree {
      public static  Node root;
      public BinarySearchTree(){
          this.root = null;
      }
  
  
      public void displaySmallToBig(Node root){ // inorder
          if(root!=null){
              displaySmallToBig(root.left);
              System.out.print(" " + root.data);
              displaySmallToBig(root.right);
          }
      }
  
      public void displayBigToSmall(Node root){
          if(root!=null){
              displaySmallToBig(root.right);
              System.out.print(" " + root.data);
              displaySmallToBig(root.left);
          }
      }
  
      public static void main(String arg[]){
          BinarySearchTree b = new BinarySearchTree();
          b.insert(3);
          b.insert(8);
          b.insert(1);
          b.insert(4);
          b.insert(6);
          b.insert(2);
          b.insert(10);
          b.insert(9);
          b.insert(20);
          b.insert(25);
          b.insert(15);
          b.insert(16);
  
          System.out.println("Original Tree : ");
  
          System.out.println("displaySmallToBig");
          b.displaySmallToBig(b.root);
          System.out.println("");
          System.out.println("displayBigToSmall");
          b.displayBigToSmall(b.root);
      }
  }
  
  class Node{
      int data;
      Node left;
      Node right;
      public Node(int data){
          this.data = data;
          left = null;
          right = null;
      }
  }
  </code></pre>