answersLogoWhite

0


Best Answer

void counts_core (const Tree *t, int *nleaf, int *nint)

{

if (t->left==NULL && t->right==NULL) ++*nleaf;

else {

++*nint;

if (t->left) counts_core (t->left, nleaf, nint);

if (t->right) counts_core (t->right, nleaf, nint);

}

}

void counts (const Tree *t, int *nleaf, int *nint)

{

*nleaf= 0;

*nint= 0;

if (t) counts_core (t, nleaf, nint);

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program to count the total number of leaf node and total number of intermidiet node?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Do questions I answered before I joined The Initiates Program count towards my answer questions mission total?

No, questions that you answered before joining The Initiates Program do not count towards your total for the answering questions mission. Only answers from the date you begin the mission count towards your total. You can check your total number of answers by clicking on "My contributions" on the blue menu and filtering to "Answers (new)".


What count of the total number of atoms in NaCL?

3


What is the total number of Upanishads?

According to Muktika Upanishad,total number of Upanishads count upto 108.


What is the name of the number that shows how many?

The count The total The sum


What is total plate count in water?

when you fill your kitchen sink with water and dirty plates...the number of plates in the sink is the total plate count in water. lol


How do you work out an atoms atomic number by looking at its electronic structure?

Count the total number of electrons.


How to solve probability questions?

Count the total number of ways it can turn out. Count the number of ways that are the condition you're looking for. The probability of the outcome you're looking for is is the second number divided by the first number.


What is the total number of receptors present in a human body?

too many to count


What is the total count of the neutrons an protons in an atom?

The sum is called mass number.


A programs Nielsen rating is determined by?

The total number of homes watching the program divided by the total number of homes with a television.


What is the carat count in a black ruthenium ring with 371 stones?

Carat count is a measurement of gem-stone weight -- the total weight of all the stones would produce the total carat count -- regardless of the number of stones.


Do alternates I split before I joined The Initiates Program count towards my splitting alternates mission total?

No, alternates that you split before joining The Initiates Program do not count towards your total for the splitting alternates mission. Similarly, any alternates that you split whilst on a previous mission do not count towards your total either. It is only the alternates that you split from the start date of your mission that count towards the mission. You can check how many alternates you have split by clicking on "My contributions" on the blue menu and filtering to "Alternates (other)".