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)
Indexed Sequential Files An index is inserted to the sequential file to provide random access. An overflow area required to be maintained to permit insertion in sequence. I
What are the properties of an algorithsm?
A Stack has an ordered list of elements & an array is also utilized to store ordered list of elements. Therefore, it would be very simple to manage a stack by using an array. Thoug
Question 1. Explain the different types of traversal on binary tree 2. Explain the Prim's minimum spanning tree algorithm 3. Differentiate fixed and variable storage allo
Compare zero-address, one-address, two-address, and three-address machines by writing programs to compute: Y = (A – B X C) / (D + E X F) for each of the four machines. The inst
Q. Explain the insertion sort with a proper algorithm. What is the complication of insertion sort in the worst case?
Explain an efficient way of storing a sparse matrix in memory. A matrix in which number of zero entries are much higher than the number of non zero entries is called sparse mat
In this unit, we will describe a data structure called Graph. Actually, graph is a general tree along no parent-child relationship. In computer science, Graphs have several applica
Explain about the Abstract data type Abstract data type (ADT) A set of values (the carrier set) and operations on those values
Red-Black trees have introduced a new property in the binary search tree that means an extra property of color (red, black). However, as these trees grow, in their operations such
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