X317: Binary Search Tree Small Count Exercise (Modified)

Write a recursive function BSTsmallcount that, given a BST and a value key, returns the number of nodes having values less than key. Your function should visit as few nodes in the BST as possible.
Here are methods that you can use on the BinNode objects:
   interface BinNode {
      public int value();
      public void setValue(int v);
      public BinNode left();
      public BinNode right();
      public boolean isLeaf();


Practice a different Java exercise