예제 #1
0
 public int count(int amount)
 {
     amount++;
     if (left != null)
     {
         amount = left.count(amount);
     }
     if (right != null)
     {
         amount = right.count(amount);
     }
     return(amount);
 }
예제 #2
0
 /**
  * Returns the amount of values in the tree
  * @return
  */
 public int count()
 {
     return(root.count(0));
 }