title: Height of the Binary search tree
body: <pre><code>public static int getHeight(Node root){
      if(root == null){
          return 0;
      }
      else{
        int left = getHeight(root.left);
          int right = getHeight(root.right);
  
          return 1+ Math.max(left, right);
      }
  </code></pre>
  
  <p>Hii I am using this method to calculate the height of the binary search tree buy it returns 1+value of the actual height of the binary tree(E.g. If the height is 3 this method is returning 4). Anyone tell me what's  wrong with this code.</p>