MORADABAD INSTITUTE OF TECHNOLOGY
Computer Science & Engineering Department
Course: B.Tech Session: 2024-25
Subject Title: Data Structure Subject Code: BCS- 301
Semester: 3rd Branch: CSE
Assignment-2 (CO2)
1. Explain Stack and its basic operations. Write applications of stack?
2. Write a C program to implement stack using array.
3. Write a C program to implement stack using link list.
4. Write an algorithm to convert infix expression to postfix form.
5. Write an algorithm to evaluate a postfix form. Evaluate the following postfix
expression: 10,2,4,*,+,5,2,*,-
6. What do you understand by stack overflow and stack underflow?
7. Convert the following infix expression to Postfix form using stack:
(a). (A+B*C/D*E*F+(G+H))
(b). A + (B + C*D + E) + F/G
(c). P*Q/R + S*T*(U+V/W*X*Y*Z)
8. Define Queue. What are the basic operations on queue? Write applications of queue?
9. Write a C function to insert an element in a queue using array.
10. Write a C function to delete an element from a queue using array.
11. Write a C program to implement queue using link list.
12. Give the array representation of priority queue.
13. Write a C program to implement priority queue using link list.
14. Why circular queues are better than simple queue? Write a C function to insert and
delete an item from circular link list.
15. Write a C program to implement circular queue using array.
16. Explain dequeue.