• edited by
1,512 views
1 1 vote
A rooted tree with 8 nodes has its nodes [1.....8] in preorder.When the tree is traversed in postorder.....nodes visited are

{3,5,4,2,7,8,6,1}.

Draw a  tree for it.

How to solve .....someone please explain?

1 Answer

Position:
Show:

Related questions

10 10 votes
1 1 answer
333
333 views
GO Classes asked Jul 28
333 views
A binary tree has:$1000$ nodes in the left subtree $100$ nodes in the right subtreeHow many nodes are processed before the root in preorder, inorder, and postorder traver...
7 7 votes
1 1 answer
204
204 views
GO Classes asked Jul 13
204 views
Which of the following functions correctly returns the total number of nodes in a binary tree rooted at $\texttt{t}$?int tree_size(TreeNode *t) { if (t == NULL) return 0;...
11 11 votes
1 1 answer
254
254 views
GO Classes asked Jul 11
254 views
Which of the following can be the number of nodes in a complete binary tree?$2$ $5$ $7$ $8$