I want to traverse a tree using inorder travesal and displaying the contents of the node. But dont know how to do since got no idea about inorder traversal.Ne body HELP!
I want to traverse a tree using inorder travesal and displaying the contents of the node. But dont know how to do since got no idea about inorder traversal.Ne body HELP!
Go left, display, go right. Pretty straightforwardI want to traverse a tree using inorder travesal and displaying the contents of the node.
Code:void inorder(struct node *tree, void (*display)(struct node *)) { inorder(tree->left, display); display(tree); inorder(tree->right, display); }
p.s. What the alphabet would look like without q and r.