Tree datastructures: Difference between revisions

Content added Content deleted
(Trolling not golfing is mocked.)
Line 7: Line 7:
wiki
wiki
mocks
mocks
golfing</pre>
trolling</pre>


A common datastructure for trees is to define node structures having a name and a, (possibly empty), list of child nodes. The nesting of nodes captures the indentation of the tree. Lets call this '''the nest form'''.
A common datastructure for trees is to define node structures having a name and a, (possibly empty), list of child nodes. The nesting of nodes captures the indentation of the tree. Lets call this '''the nest form'''.
Line 34: Line 34:
;Note:
;Note:
* It's all about showing aspects of the contrasting datastructures as they hold the tree.
* It's all about showing aspects of the contrasting datastructures as they hold the tree.
* The word "golfing" may be substituted by "trolling" in the tree as golfing can be friendly fun! (just not for RC examples).
* Comparing nested datastructures is secondary - saving formatted output as a string then a string compare would suffice for this task, if its easier.
* Comparing nested datastructures is secondary - saving formatted output as a string then a string compare would suffice for this task, if its easier.
* The word "trolling" is substituted for the original, less appropriate, "golfing" in the tree above as golfing can be friendly fun! (just not for RC examples). '''Please update language examples appropriately'''.
<br>
<br>