TreeLeaves

TreeLeaves[tree]

returns the list of leaves of the tree tree.

Details

Examples

open allclose all

Basic Examples  (1)

Get the leaves of a tree:

Properties & Relations  (3)

TreeLeaves gives the subtrees at level -1:

TreeLeaves[tree] returns the list of subtrees for which TreeLeafQ gives True:

TreeLeafCount[tree] is equivalent to Length[TreeLeaves[tree]]:

Wolfram Research (2021), TreeLeaves, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeLeaves.html (updated 2022).

Text

Wolfram Research (2021), TreeLeaves, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeLeaves.html (updated 2022).

CMS

Wolfram Language. 2021. "TreeLeaves." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/TreeLeaves.html.

APA

Wolfram Language. (2021). TreeLeaves. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeLeaves.html

BibTeX

@misc{reference.wolfram_2024_treeleaves, author="Wolfram Research", title="{TreeLeaves}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TreeLeaves.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_treeleaves, organization={Wolfram Research}, title={TreeLeaves}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeLeaves.html}, note=[Accessed: 22-November-2024 ]}