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*+
i:=1 while(i { x:=x+1; i:=i+1; }
Which data structure is required to change infix notation to postfix notation? Stack function is used to change infix notation to postfix notatio n
Dequeue (a double ended queue) is an abstract data type alike to queue, where insertion and deletion of elements are allowed at both of the ends. Like a linear queue & a circular q
Five popular hashing functions are as follows: 1) Division Method 2) Midsquare Method 3) Folding Method 4) Multiplicative method 5) Digit Analysis
sample infosys campusconnect questions
For AVL trees the deletion algorithm is a little more complicated as there are various extra steps involved in the deletion of node. If the node is not a leaf node, then it contain
Q. A Binary tree comprises 9 nodes. The preorder and inorder traversals of the tree yield the given sequence of nodes: Inorder : E A C K F H D
Any binary search tree must contain following properties to be called as a red-black tree. 1. Each node of a tree should be either red or black. 2. The root node is always bl
This algorithm inputs 5 values and outputs how many input numbers were positive and how many were negative. Data to be used: N = 1, -5, 2, -8, -7
1.Create a flowchart to show the process that will allow the implementation of Stack, Push, and Pop operations. 2.Create a flowchart to show the process that will allow the impleme
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