Sir M.
Visvesvaraya Institute of Technology
Bengaluru - 562157
Approved by AICTE | Affiliated to VTU Belagavi | Accredited by NAAC
Department of Electronics and computer Engineering
Tutorial questions
Module 2
1. What are the application of stack DS
2. What is LIFO explain
3. What is FIFO explain
4. What is top pointer ? explain its significance.
5. Define stack. Give the C implementation for the push and pop (Also called Primitive functions)
function. Include conditions for full and empty conditions.
6. Write the algorithms for stack implementation(PUSH,POP and PEEK)
7. Explain how stack can be implemented using dynamic arrays.
8. Write the add and delete functions of a circular queue. What is the advantage of circular queue
over linear queue For the given circular queue write the values of front and rear after each
specified operation is performed
9. Write a function to evaluate a postfix expression.
10. Obtain the postfix and prefix of (any given expression ).
11. Write an algorithm to convert and infix expression to postfix and convert the expression(any
expression can be given) to postfix.
12. Write the ADT of stack.
13. What is Queue and circular queue.
14. What are front and rear pointer? Explain their significance.
15. What are the application areas of queues?
16. Write the algorithms for queue and circular queue implementation(insert,delete and display)
17. Write functions to insert into and delete from a circular queue.
18. Explain how circular queue can be implemented using dynamic arrays.
19. Write the push and pop functions to implement multiple stacks.
20. Write recursive function for
a. tower of Hanoi b. Ackermann function. c. Gcd of two numbers d. Fibonicci series.
19 Briefly explain overflow and underflow condition
20 Perform dry run of evaluation of postfix expression 893*84/ using stacks showing stack content
in each step.
21 Perform dry run of conversion of the infix expression (a+(b-c))*c using stacks showing the
contents of the stack in each step.
22 Deduce the content of an empty queue after the execution of the following operations in
sequence:
a) Insert(9)
b) Insert (-7)
c) Delete()
d) Insert(4)
e) Delete()
f) Insert(18)
23 Deduce the content of an empty queue after the execution of the following operations in sequence:
a) Push(6)
b) Push(8)
c) Push(-1)
d) Pop()
e) Push(7)
f) Pop()