Talk:Tree datastructures: Difference between revisions

Content added Content deleted
Line 79: Line 79:
- to the last line of the outline.</pre>
- to the last line of the outline.</pre>


==Generic tree to indent-type datastructure convertion==
==Generic tree to indent-type datastructure conversion==
The following is the diagram from the [[Tree traversal]] task annotated with depth information for the nodes:
The following is the diagram from the [[Tree traversal]] task annotated with depth information for the nodes:
:NODE_DEPTH
:NODE_DEPTH
Line 92: Line 92:
7 8 9 :3
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)
A '''preorder''' traversal of the tree outputting <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)