Examlex

Solved

A Ternary Tree Is Like a Binary Tree,except Each Node

question 38

Essay

A ternary tree is like a binary tree,except each node may have up to three successors.Write a TNode class that can be used to represent a ternary tree.Define a notion of preorder and postorder traversal for ternary trees,and write methods void postorder(TNode tree)and void preorder(TNode tree)that implements your notion of those traversals.


Definitions:

Related Questions