Trees
Hierarchical data structures with one root element having zero to many children each of those itself can be treated as a root of a subtree.
Last updated
Was this helpful?
Hierarchical data structures with one root element having zero to many children each of those itself can be treated as a root of a subtree.
Last updated
Was this helpful?
Import alias 'ads-js/trees'
- a tree in which each element can have either zero or many children. This structure is link-based.
- a tree in which each element can have either zero, one or two children. This structure is link-based.
- tree traversal algorithm that on each level of a tree visits root before traversing its subtrees.
- tree traversal algorithm that on each level of a tree visits root after traversing its leftmost subtree.
- tree traversal algorithm that on each level of a tree visits root after traversing its subtrees.
- tree traversal algorithm which walks around the tree in a 'bound-to-left' manner and visits each element 2 (pre and post) times for general and 3 (pre, in and post) times for binary trees.