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