title: Counting number of nodes less than X in BST
body: <p>I have a code that is giving me these problems. Can you give me some hint or guide about the mistake I am making, or any change that I should make? The errors are:</p>
  
  <p>BSTNode'&lt;'Golfer'>' cannot be converted to BinarySearchTree'&lt;'Golfer'>'.</p>
  
  <pre><code>public int countLess (BinarySearchTree &lt;Golfer&gt; tree, int value) {
  BSTNode&lt;Golfer&gt; node = tree.node;
  
  if (node == null) 
  return 0;
  
  int left = countLess(node.getLeft(), value);
  int right  = countRight(node.getRight(), value);
  return (node.getInfo() &gt; maxValue ? 1:0) + countLeft + countRight;
  }
  </code></pre>