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. Describe the representations of graph. Represent the graph which is given to us using any two methods Ans: The different ways by which we can represent graphs are:
a. In worst case the order of linear search is O (n/2) b. Linear search is more competent than Binary search. c. For Binary search, the array must be sorted in ascending orde
How To implement stack using two queues , analyze the running time of the stack operations ?
adjacency multi list
Which sorting methods would be most suitable for sorting a list which is almost sorted Bubble Sorting method.
Q. Explain Dijkstra's algorithm for finding the shortest path in the graph given to us. Ans: The Dijkstra's algorithm: This is a problem which is concerned with finding
Q. Illustrate the steps for converting the infix expression into the postfix expression for the given expression (a + b)∗ (c + d)/(e + f ) ↑ g .
We will start by defining a new structure called Heap. Figure 3 illustrates a Binary tree. Figure: A Binary Tree A complete binary tree is said to assure the 'heap con
Q. Write down the algorithm to insert an element to a max-heap which is represented sequentially. Ans: The algorithm to insert an element "newkey" to
Write a program to create a hashed file that stores the records currently in the file " data_2013 ". Records should use the same fixed-length schema given previously, and should ag
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