Height on BinaryTree
The height: the most nodes on a path from the root, 0 for the empty tree.
Called as CombinatorialStat(x, "Height"). 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: DyckPath, OrderedTree.
FindStat St000050
The depth or height of a binary tree.
| Object | Value |
|---|---|
[.,.] | 1 |
[.,[.,.]] | 2 |
[[.,.],.] | 2 |
[.,[.,[.,.]]] | 3 |
[.,[[.,.],.]] | 3 |
[[.,.],[.,.]] | 2 |
[[.,[.,.]],.] | 3 |
[[[.,.],.],.] | 3 |
Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St000050 has the rest.