WLJS LogoWLJS Notebook

TreeSize

TreeSize[tree] gives the number of subtrees of tree.

Examples

TreeSize[Tree[a, {Tree[b, {}], Tree[c, {}]}]]
(* 3 *)

Please visit the official Wolfram Language Reference for more details.

On this page