Data structure Assignment 1
Data structure Assignment 1
Module 1
Module 2
3. Write an algorithm to convert infix expression to postfix expression and also convert the following infix
expression to postfix form.
a) A*(B+C)*D
b) (A-B)*(D/E)
Module 3
1. a)Explain ADT as Queue.
b) Consider the following Queue where Queue is a Circular Queue having 6 memory cells.
Front = 2, Rear = 4.
Queue: _, A, C, D, _, _
Describe queue as following operations take place:
F is added to the queue
Two letters are deleted
R is added to the queue
S is added to the queue
One letter is deleted
2. What are the different types of Dequeue ? And also write an algorithm to perform various operations on Dequeue.
3. Compare linear queue with circular queue.
4. Write an algorithm to perform following operation on linear queue using an array.
a) Insert b) delete c) display
5. Define Priority queue with example? And also list the advantages of priority queue.