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)
Add -75to+25 in 2s complement
In this unit, we described about the data structure Queue. It had two ends. One is front from where the elements can be removed and the other is rear where the elements can be inse
The time needed to delete a node x from a doubly linked list having n nodes is O (1)
The disadvantages or limitations of the last in first out costing method are: The election of last in first out for income tax purposes is binding for all subsequent yea
(a) Discuss the role played by Business Intelligence Systems in giving companies strategic advantage. (b) Explain the term heuristics searching . (c) With the use of an appr
Comparison Techniques There are several techniques for determining the relevancy and relative position of two polygons. Not all tests may be used with all hidden-surface algori
The following DNA sequences are extracted from promoter region of genes which are co-regulated by the same transcription factor (TF). The nucleotide segments capitalized in the giv
Ask question find frequency count of function- {for(i=1;i {for(j=1;j {for(k=1;k } } }
Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.
State in brief about assertion Assertion: A statement which should be true at a designated point in a program.
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