Unit 3
Unit 3
Question Bank
Srno. Unit-3
1. What is a stack? List out operations of stack.
2. What is top of stack? Why stack is called LIFO list?
Write an algorithm of stack for following operation :-
3.
a) Push
b) Pop
c) Peep
d) update
4. List out applications of stack.
5.. List out polish notations with example and definition.
Write an algorithm for polish notation :-
6.
a) convert Infix to postfix
b) Convert Infix to prefix
c) Evaluation of postfix string
Convert following expression in prefix and postfix using tabular format :-
7.
a) ((a+b^c^d)*(e+f/d))
b) a^b*c-d+e/f/(g+h)
c) ((a+b^c^d)*(e+f/d))
d) A+B-C*D*E $ F $ G
Evaluate following expression using Stack :-
8.
a) 2 3 * 8 2 / 2 * + 6 2 * - 4 +
b) 3 4 + 2 * 2 ^
c) 5 7 + 6 2 - *
9. What is queue? Give the some example where Queue is use in daily life.
10. List out the Queue operation. Explain with tracing with proper example.
Write down algorithm for linear/simple queue.
11.
a) Insert
b) Delete