Skip to content

Leaves on BinaryTree ​

The number of nodes with no children.

On BinaryTree

Called as CombinatorialStat(x, "Leaves"). The head's page has its examples.

Live

Distribution

Over BinaryTrees at each size, tallied here in your browser; sizes past 6 are not offered.

Also on

The same name on other carriers, each its own implementation: OrderedTree.

FindStat St000201

The number of leaf nodes in a binary tree.

ObjectValue
[.,.]1
[.,[.,.]]1
[[.,.],.]1
[.,[.,[.,.]]]1
[.,[[.,.],.]]1
[[.,.],[.,.]]2
[[.,[.,.]],.]1
[[[.,.],.],.]1

Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St000201 has the rest.