| Q & A Home |
| Math |
| Science |
| History |
| IT & Web |
| Programming |
| Health |
| Business |
| Arts & Humanities |
| Social Studies |
| Engineering & Technology |
| Arts & Entertainment |
| Humanities |
| Sports |
| Auto |
| Hobbies |
| Books and Literature |
| Electronics |
| Food & Drink |
| Jobs & Education |
| Law & Government |
| Travel & Places |
| People & Society |
| Beauty & Health |
| Animals & Plants |
| Other |
Ahmad Moushumi 29 Jun, 2024 11:58:00 PM 1 118
Best Answer: 1) If the node is NULL then return 0.
2) Else If left and right child nodes are NULL return 1.
3) Else recursively calculate leaf count of the tree using the formula below.
Leaf count of a tree = Leaf count of left subtree + Leaf count of right subtree
Ahmad Moushumi 29 Jun, 2024 11:58:00 PM