Write a function that takes as input a general tree and returns the number of nodes in

Question:

Write a function that takes as input a general tree and returns the number of nodes in that tree. Write your function to use the GenTree and GTNode ADTs of Figure 6.2.

/** General tree ADT */ interface GenTree { public void clear (); public GTNode root (); // Clear the tree //

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: