Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

1.Can you construct a tree using postorder and preorder traversal?

Add comment
Views: 376
Votes: 0
Comments: 0

No

Consider 2 trees below

 

Tree1

a
b


Tree 2

a
b


preorder = ab
postorder = ba


Preorder and postorder do not uniquely define a binary tree. Nor do preorder and level order (same example). Nor do postorder and level order.

Others in this Category
document Q: 6. What do you accomplish by GROUP BY .... HAVING clause?
document Q: What is the meaning of underscore ( ‘_’ ) in the LIKE statement?
document What is a threaded binary tree?
document Q: What is the COBOL picture clause for a DB2 column defined as DECIMAL(11,2)?
document What is a threaded binary tree?
document Q: What is 'LIKE' used for in WHERE clause? What are the wildcard characters?
document Find the closest ancestor of two nodes in a tree.
document How many different trees can be constructed using n nodes?
document A full N-ary tree has M non-leaf nodes, how many leaf nodes does it have?
document What is an AVL tree?
» More articles



RSS