Description
Write a routine to list out the nodes of a binary tree in
Input
where void (*visit)(Tree ThisNode) is a function that handles ThisNode being visited by Level_order, and Tree is defined as the following:
typedef struct TreeNode *Tree;
struct TreeNode {
ElementType Element;
Tree Left;
Tree Right;
};
Output
Return the level-order of input tree
Level-order: 3 5 6 1 8 10 9