Assignment 2 (Stack & Queues)
Assignment 2 (Stack & Queues)
TECH - CS
Assignment - 2
Semester-I (Odd), Session: 2023-24
BCS-301: Data Structure
Unit-2 Course Outcome: CO2 – Describe how arrays,
Unit-Name: Stacks and Queues stacks and Queues are represented in memory,
used by the algorithms and their common
applications
Date of Distribution: 11/10/2023 Faculty Name: Dr. Ashish Avasthi, Dr. Arpita
Singh and Mr. Abhishek Tiwari
E = (A + B) * C + D / (B + A * C) + D
E = A/B C+D*E–A*C
Convert the above expression into postfix and prefix notation.
13 Write the procedures for insertion, deletion and traversal of a queue. 2
14 What is circular queue ? Write a C code to insert an element in circular queue. Write 3
all the condition for overflow.
15 Explain how a circular queue can be implemented using arrays. Write all functions 3
for circular queue operations.
16 What do you mean by priority queue ? Describe its applications. 1
SUPPLEMENTARY QUESTIONS
1 Evaluate the result for postfix expression 10 5+60 6/ 8−.
2 The following postfix expression with single digit operands is evaluated using a stack:
8 2 3 ^ / 2 3 * + 5 1 * - Note that ^ is the exponentiation operator. The top two elements
of the stack after the first * is evaluated are:?
IQAC/ASU/F/2023-24/2.1 Page 1 of
2
REFERENCES
TEXT BOOKS:
Ref. Authors Book Title Publisher/Press Edition &Year of
[ID] Publication
Data Structure Using C Oxford Higher 6th 2020
[T1] Thareja
Education
“Data Structures” McGraw-hill 7th edition
[T3] Lipschutz
Education (India)
[T2] . AK Sharma Data Structure Using C Pearson Education 5th 2018
India
ONLI NE/DIGITALREFERENC ES:
Ref.
Source Name Source Hyperlink
[ID]
Great Learning
[D1] https://www.mygreatlearning.com/blog/data-structures-using-c/
IQAC/ASU/F/2023-24/2.1 Page 2 of 2
Signature of Faculty:______________ Signature of HOD:_______________
(With Date) (With Date)