Talk:Tree datastructures: Difference between revisions

Line 79:
- to the last line of the outline.</pre>
 
==A genericGeneric tree to indent-type datastructure converterconvertion==
The following is the diagram from the [[Tree traversal]] task annotated with depth information for the nodes:
:NODE_DEPTH
1 :0
/ \
/ \
/ \
2 3 :1
/ \ /
4 5 6 :2
/ / \
7 8 9 :3
 
A '''preorder''' traversal of the tree outputing <code>(node_depth, node_name)</code> pairs will generate the indent form of this and other rooted trees. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 21:43, 19 October 2019 (UTC)
Anonymous user