WLJS LogoWLJS Notebook

TreeLeafCount

TreeLeafCount[tree] gives the number of leaves of tree.

Examples

TreeLeafCount[Tree[a, {Tree[b, None], Tree[c, None]}]]
TreeLeafCount[ExpressionTree[a + b + c]]

Please visit the official Wolfram Language Reference for more details.

On this page