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. Convert the following given Infix expression to Postfix form using the stack function: x + y * z + (p * q + r ) * s, Follow general precedence rule and suppose that the expression is legal.
Ans.
The given infix expression is as follows :-
x + y * z + (p * q + r) * s
Symb Stack Postfix Expression x empty x
+ + x
y + xy
* +* xy
z +* xyz
+ + xyz*+ ( +( xyz*+
p +( xyz*+p
* +(* xyz*+p q +(* xyz*+p
+ +(+ xyz*+pq*
r +(+ xyz*+pq*r
) + xyz*+pq*r+
* +* xyz*+pq*r+
s +* xyz*+pq*r+s
= xyz*+pq*r+s*+ The postfix expression obtained is :- xyz*+pq*r+s*+
The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node
Complexity of an Algorithm An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorith
an electrical student designed a circuit in which the impedence in one part of a series circuit is 2+j8 ohms and the impedent is another part of the circuit is 4-j60 ohm mm program
Q. Let us consider a queue is housed in an array in circular fashion or trend. It is required to add new items to the queue. Write down a method ENQ to achieve this also check whet
Primitive Data Structure These are the basic structure and are directly operated upon by the machine instructions. These in general have dissimilar representations on different
The algorithm to delete any node having key from a binary search tree is not simple where as several cases has to be considered. If the node to be deleted contains no sons,
include include include /* Definition of structure node */ typedef struct node { int data; struct node *next; } ; /* Definition of push function */
Now, consider a function that calculates partial sum of an integer n. int psum(int n) { int i, partial_sum; partial_sum = 0; /* L
One of the best known methods for external sorting on tapes is the polyphase sort. Principle: The basic strategy of this sort is to distribute ordered initial runs of predetermi
1. Show the effect of each of the following operations on queue q. Assume that y (type Character) contains the character ‘&’. What are the final values of x and success (type boole
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