Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. Draw the expression tree of the infix expression written below and then convert it intoPrefix and Postfix expressions.
((a + b) + c * (d + e) + f )* (g + h )
Ans:
The expression given is:
The postfix expression obtained is: ((a+b)+c*(d+e)+f)*(g+h) = ((ab+)+c*(de+)+f)*(gh+) = ((ab+)+(cde+*)+f)*(gh+) = ((ab+cde+*+)+f)*(gh+) = (ab+cde+*+f+)*(gh+) =(ab+cde+*+f+gh+*) The prefix expression obtained is: ((a+b)+c*(d+e)+f)*(g+h) = ((+ab)+c*(+de)+f)*(+gh) = ((+ab)+(*c+de)+f)*(+gh) = ((++ab*c+de)+f)*(+gh) = (+++ab*c+def)*(+gh) = (*+++ab*c+def+gh)
The postfix expression obtained is:
((a+b)+c*(d+e)+f)*(g+h)
= ((ab+)+c*(de+)+f)*(gh+)
= ((ab+)+(cde+*)+f)*(gh+)
= ((ab+cde+*+)+f)*(gh+)
= (ab+cde+*+f+)*(gh+)
=(ab+cde+*+f+gh+*)
The prefix expression obtained is:
= ((+ab)+c*(+de)+f)*(+gh)
= ((+ab)+(*c+de)+f)*(+gh)
= ((++ab*c+de)+f)*(+gh)
= (+++ab*c+def)*(+gh)
= (*+++ab*c+def+gh)
One can change a binary tree into its mirror image by traversing it in Postorder is the only proecess whcih can convert binary tree into its mirror image.
Time Complexity, Big O notation The amount of time needed by an algorithm to run to its completion is referred as time complexity. The asymptotic running time of an algorithm i
how to define the size of array
how we can convert a graph into tree
Explain an efficient and effective way of storing two symmetric matrices of the same order in the memory. A n-square matrix array will be symmetric if a[j][k]=a[k][j] for all j
Question 1 Explain the following? Arrays Stack Trees Question 2 Explain the Linked list implementation of stack Question 3 What is a binary tree? Expla
State the ways to construct container taxonomy There are several ways that we could construct our container taxonomy from here; one way that works well is to make a fundamental
what algorithms can i use for the above title in my project desing and implmentation of road transport booking system
It does not have any cycles (circuits, or closed paths), which would imply the existence of more than one path among two nodes. It is the most general kind of tree, and might be co
Representation of data structure in memory is known as: Abstract data type
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd