Question: 5 A ) i ) Construct the Expression tree using the stack for the following and also describe the steps for implementing the same and

5A) i) Construct the Expression tree using the stack for the following and also describe the steps for
implementing the same and traverse the tree and provide the infix, postfix and prefix order traversal
of the constructed expression tree using stack for the following expressions.
(5-z-8)*(42) also evaluate the expression tree when z=20
((true V false)??? false)vv(true V false)
ab+cde+**
(2a+5b)3?*(x-7y)4
ii) Construct the Binary search tree (BST) for the following and provide the Post-order, In-order, and
Pre-order traversal of the following:
a) Given the post order A C E D B H I G F construct the BST and outline the In-order and Post order
tree traversal.
b) Given the pre-order traversal order of the tree 20,16,5,18,17,19,60,85,70 construct the BST
and provide the In-order and Post order tree traversal.
5B) Outline the definition of sparse matrix. Implement the C++ User defined function to implement the
Sparse matrix addition and multiplication?
5C) Write the user defined functions to merge the 2 binary trees? What problems you will face if you
merge two binary trees of numerical elements which are represented using A single array.
 5A) i) Construct the Expression tree using the stack for the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!