Department of First Year Engineering
Academic Year 2024-25
Assignment 1
Subject-Data Structure
Scheme-NEP 2020 Course code- PCC2011
Module 1
1. Define ADT with example.
2. Explain different types of Data Structure with examples.
3. State and explain various operations performed on Data Structure.
4. Differentiate between Linear and Non-linear Data Structure.
Module 2
1. Write a Pseudo code to perform PUSH and POP operation on Stack.
2. Write an algorithm to evaluate postfix expression using stack and also evaluate following postfix expression using
stack.
a) 5 4 6 + * 4 9 3 / + *
b) 7 6 + 4 * 4 10 + - 5 +
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)
4. What is recursion? Explain with example.
5. Evaluate the following postfix expression and show stack after every step in tabular form.
Given: A=5 , B=6 , C=2 , D=12 , E=4 and expression is: A B C + * 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.