I am not a computer programmer but I need this idea for one of my projects. I would explain what I am trying to achieve:
These are two pictures picture picture. Can we write a code to find the number of nodes whose both children are the terminal node? If yes then I would spend the time to form the algorithm or I may try to achieve it in some other way.
If achieved, the answer to my problem would be 3 (1+2), based on above pictures.
NOTE : 1) This are Full Binary tree. 2) There are many more trees. 3) I am Using Python