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*+
Q. Write down the recursive function to count the number of the nodes in the binary tree. A n s . R ecursive Function to count no. of Nodes in Binary Tree is writt
So far, we now have been concerned only with the representation of single stack. What happens while a data representation is required for several stacks? Let us consider an array X
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
program on function loading
Write down the algorithm of quick sort. An algorithm for quick sort: void quicksort ( int a[ ], int lower, int upper ) { int i ; if ( upper > lower ) { i = split ( a,
Definition of Algorithm Algorithm must have the following five characteristic features: 1. Input 2. Output 3. Definiteness 4. Effectiveness 5
Krushkal's algorithm uses the concept of forest of trees. At first the forest contains n single node trees (and no edges). At each of the step, we add on one (the cheapest one) edg
What is an unreachable code assertion An unreachable code assertion can be placed at the default case; if it's every executed, then program is in an erroneous state. A loop in
Area Subdivision Method In this method, the viewport is examined for clear decisions on the polygons situated in it, in regard to their overlap and visibility to the viewer. Fo
#question bubble sort..
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