VIGNAN’S FOUNDATION FOR SCIENCE, TECHNOLOGY & RESEARCH
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Module Bank-1
Course Name: Data Structures Course Code: 22TP201
Year & Sem: II & I A.Y: 2025-26
Course Outcomes & Program Outcomes of Data Structures (22TP201)
Course Outcomes(Cos) Program Outcomes (POs)
CO1: Explore the organization of several ADTs
and the manipulation (searching, insertion,
deletion, traversing) of data stored in various PO1: Engineering Knowledge
data structures.
CO2: Apply different data structures to solve a
given problem. PO2: Problem Analysis
CO3: Analyze the efficiency of using different
data structures and choose the efficient data PO3: Design/Development of Solutions
structure for solving a given problem.
CO4: Develop new algorithms to solve various PO4: Conduct Investigations of Complex
problems. Problems
PO5: Modern Tool Usage
Topic: Sorting
Qno Question Blooms CO PO
Taxonomy
Problem Statement:
Design and develop the solution for the given data structure. Given Score of ‘N’ students in ‘M’
1 courses and you need to perform the following operations:
N Rows and M columns (input from user). Your task is to sort an array based on courses i.e.,
Sort the first course marks by using bubble sort and must be
a) Understand CO1 1,2
sorted in ascending order.
Sort the second course marks by using selection sort and must be
b) Understand CO1 1,2
sorted in descending order.
Sort the third course marks by using insertion sort and must be
c) Understand CO1 1,2
sorted in ascending order.
Which sorting gives the minimum number of swaps?
And if there are less courses, for example only 2 courses are
present then you need to perform up to selection sort only and if
more than 3 courses then proceed again from the first step i.e.,
from bubble sort.
Sample I/P:
d) Apply CO2 2,3
N = 3, M = 4
51 64 85 70
62 75 73 89
45 69 31 58
Output: At every step display the elements in the array for
every time it has been sorted. Mention the sort that it had done.
Problem Statement: Insertion Sort – Sorting Quiz Scores
A teacher records quiz scores of 6 students:
2 Scores: [72, 65, 78, 60, 75, 68]
She wants to sort the scores in ascending order for preparing a ranked sheet. Since the list is
relatively small and mostly unsorted, she chooses Insertion Sort for its adaptive performance and
simplicity.
Explain how Insertion Sort builds the sorted array. Why is it
a) Understand CO1 1,2
considered efficient for small or nearly sorted datasets?
What will the array look like after inserting the first three
b) Understand CO1 1,2
elements into their correct position?
Count how many comparisons and shifts are made while
c) Apply CO2 2,3
inserting the 5th element (75) into its correct position.
Perform full Insertion Sort on the given score array and display
d) Apply CO2 2,3
the final sorted order.
If a new score 69 is added to the list, explain how you would
e) insert it into the existing sorted array without re-sorting the Analyze CO3 3,4
entire list.
Topic: Searching
Qno Question Blooms CO PO
Taxonomy
Problem Statement:
A company invited applications for sales manager post. They shortlisted some applications and
1 released in order of their Aadhar number. Shortlisted Aadhar number are given ass below:
{1234, 1556, 1789, 2001, 2346, 2568, 2931, 3041, 5678}
Design an efficient searching algorithm to search for application
a) Understand CO1 1,2
number 2568.
b) Illustrate the algorithm for searching an application number 2347. Understand CO1 1,2
Is algorithm implemented in (a) will perform efficiently, If the
c) Apply CO2 2,3
shortlisted applications are not in sorted. Justify the answer
d) Analyse the time complexity of algorithm implemented (a). Apply CO2 2,3
Qno Question Blooms CO PO
Taxonomy
Problem Statement: Searching Patient Records in a Hospital System
A hospital’s system contains two datasets:
Emergency patient IDs (sorted): [301, 310, 315, 320, 330]
2
Regular outpatient IDs (unsorted): [340, 325, 312, 350, 345]
Staff must verify if any patient has been listed in both categories, which is rare but critical in
emergencies.
Why is data being sorted a prerequisite for Binary Search? Can
a) Binary Search still work if the data appears ordered but isn't Understand CO1 1,2
actually sorted?
Perform Binary Search on the emergency list to find 320. How
b) Understand CO1 1,2
many steps are required and what comparisons are made?
Now, search for 325 in the outpatient list using Linear Search.
c) Apply CO2 2,3
Compare it to Binary Search in terms of efficiency and reliability.
Imagine both lists have grown to 1000 records. Write a plan that
d) Analyze CO3 3,4
minimizes search time while checking for overlapping patients.
Consider you must check for common patients between both
e) datasets weekly. Propose and justify a hybrid approach that Analyze CO3 3,4
saves time and avoids redundant comparisons.
Topic: Linked list
Qno Question Blooms CO PO
Taxonomy
Problem Statement: Managing Student Queue in Library
A college library system maintains a queue of students waiting to borrow books. The system uses a
1 singly linked list where each node holds the student's name and ID. New students are added at the
end, and students who complete borrowing are removed from the front.
Why is a singly linked list suitable for implementing this queue
a) Understand CO1 1,2
rather than an array?
Describe how the insertAtEnd function works in a singly linked
b) Understand CO1 1,2
list for this queue.
Design an algorithm or pseudocode to remove the front student
c) Apply CO2 2,3
(first node) from the linked list.
If the queue is empty and a delete operation is attempted, what
d) Analyze CO3 3,4
condition should your program check for?
Suggest one modification to this linked list structure to improve
e) Analyze CO3 3,4
the time efficiency of both front and rear operations.
Qno Question Blooms CO PO
Taxonomy
Problem Statement: Round-Robin Task Scheduling in an Operating System
An operating system manages CPU processes using a Round-Robin scheduling algorithm, where
2 each task (process) gets an equal share of CPU time in a rotating order. To implement this, a circular
linked list is used where each node represents a task with attributes like task ID, name, and burst
time. After the last task is served, the control goes back to the first task automatically.
Explain why a circular linked list is better suited for Round-
a) Understand CO1 1,2
Robin scheduling compared to a singly linked list.
Given a circular list with the following 3 tasks:
P1(5ms) → P2(8ms) → P3(3ms) (→ back to P1),
b) Understand CO1 1,2
describe the order in which the CPU will execute the tasks for one
full cycle of execution.
Design an algorithm/ pseudocode to insert a new task node at
c) the end of the circular list while maintaining the circular Apply CO2 2,3
property.
Show how to traverse the circular list and delete a completed
d) Apply CO2 2,3
task (e.g., burst time becomes 0).
Discuss how the structure of a circular linked list helps reduce
CPU idle time in scheduling.
e) Analyze CO3 3,4
Can you think of any limitations of using it for real-time systems?
Topic: Stacks
Qno Question Blooms CO PO
Taxonomy
Problem Statement: Web Browser History Navigation
Modern web browsers maintain a history of pages using the Stack data structure to allow users to
1 go back and forward between visited pages.
A user visits these pages in order: Home → News → Sports → Article. Then, they press Back twice and
then Forward once.
Which stack operations simulate the Back and Forward features
a) Understand CO1 1,2
in a browser?
Trace the contents of the Back and Forward stacks after each
b) Understand CO1 1,2
operation above.
What is the time complexity of the push and pop operations in a
c) Apply CO2 2,3
stack? Why is this suitable for browser history?
Suggest one limitation of using only stacks for navigation.
d) Propose an improvement or hybrid structure for more flexible Apply CO2 2,3
browsing history.
Qno Question Blooms CO PO
Taxonomy
Problem Statement: Directory Navigation in File Systems
2 Modern operating systems use a stack to manage directory traversal. When navigating into a folder,
the current path is pushed onto a stack. When the user chooses to go back (e.g., clicking "Up" in a
file explorer), the previous directory is popped from the stack and restored as the current path.
What stack operations are used when entering and exiting
a) Remember CO1 1,2
directories in a file system?
Explain how the LIFO property of stacks helps in returning to the
b) Understand CO1 1,2
most recent directory.
Suppose you navigate through folders like: C:\ → Users → John
c) → Documents. Show the stack content and how it changes when Apply CO2 2,3
you go back twice.
What problems can occur if you navigate using shortcuts that
d) don’t follow sequential folder access? How does that affect the Analyze CO3 3,4
stack?
Propose a way to implement both "Back" and "Forward"
e) Evaluate CO4 3,4,5
navigation using two stacks in a file explorer.
Topic: Queues
Qno Question Blooms CO PO
Taxonomy
Problem Statement: Service Ticketing System
Design and implement a customer service ticketing system using a Queue data structure. The
system will manage customer service requests (tickets) in a First-In-First-Out (FIFO) order,
ensuring that the earliest submitted requests are addressed first. This structure is ideal for scenarios
where fairness and order of processing are crucial, such as in a customer support environment.
Requirements:Add Ticket: Customers should be able to submit new service requests (tickets).
Each ticket will contain relevant information such as customer ID, issue description, and
submission time. The new ticket should be added to the end of the queue.
1 Serve Ticket: Customer service representatives should be able to process the next ticket in the
queue. The ticket at the front of the queue should be removed and served, ensuring that the oldest
request is handled first.
Display Tickets: The system should allow customer service representatives to view all pending
tickets in the queue. The tickets should be displayed in the order they were submitted, from the
oldest to the most recent.
Remove Ticket: Customers should have the ability to cancel their submitted tickets if they no
longer need assistance. The system should search for the specific ticket in the queue, remove it, and
maintain the integrity of the queue.
Why is the Queue data structure suitable for managing customer
a) service tickets? How does the FIFO property of a queue ensure Remember CO1 1,2
fairness in processing?
How would you implement the function to add a new ticket to the
b) queue? What considerations should be made to ensure that the Understand CO1 1,2
ticket is added correctly?
Design a method to handle urgent tickets in the queue. How
c) would you modify the existing structure to prioritize these tickets Apply CO2 2,3
while still processing normal tickets fairly?
Analyze the impact of frequently cancelling tickets on the
d) performance of the system. How does the removal of specific Analyze CO3 3,4
tickets affect the efficiency of the queue?
Qno Question Blooms CO PO
Taxonomy
Problem Statement: Circular Queue in Call Center
2 A call center uses a circular queue to manage customer calls. As calls are received, they are added
to the queue, and operators handle them one by one. When the end of the queue is reached, it wraps
to the beginning to use space efficiently.
What is the key difference between a circular queue and a linear
a) Remember CO1 1,2
queue in terms of memory usage?
Explain how circular queues help prevent wastage of space that
b) Understand CO1 1,2
occurs in linear queue implementations.
Implement the enqueue and dequeue operations for a circular
c) Apply CO2 2,3
queue using an array and keep track of front and rear pointers.
Under what specific conditions can a circular queue appear full,
d) Analyze CO3 3,4
even though there is physical space left in the array?
Compare the performance of a linear queue and circular queue
e) when used in a real-time call handling system. Which is better Analyze CO4 3,4,5
and why?