A tree of arbitrary width and depth is defined using mutual recursion.
The figure below shows the mutual reference in the data definition and the corresponding function template.
Also contrast a tree with a list. A tree has arbitrary width and depth which a list has arbitrary length.
No comments:
Post a Comment