Exemple #1
0
 /* returns number of nodes in this subtree */
 public int nodeCount() {
   if (leaf) {
     return 1;
   } else {
     return 1 + leftChild.nodeCount() + rightChild.nodeCount();
   }
 }