JavaScript is required for SkillDojo AI to work properly. Please enable JavaScript and refresh the page.
Coding Practice
Coding Challenge · BEGINNER
Given a binary tree, write a function to count the number of leaf nodes in the tree. A leaf node is a node with no children.