Advanced Data Structures and Algorithms Lab ABV-IIITM Gwalior
ABV-Indian Institute of Information Technology and Management, Gwalior
Department of Computer Science and Engineering
Advanced Data Structures and Algorithms Lab
Topic: Basic Data Structure
Assignment 2 Date: 26-08-2025
Lab Questions on Queues
1. Circular Queue Operations
Design and implement a circular queue using arrays. Your program should include func-
tions for enqueue, dequeue, peek, and checks for overflow/underflow conditions.
• Perform a sequence of at least 10 operations, demonstrating wrap-around behavior.
• Display the queue after each operation.
2. Linked List-based Queue
Write a program to implement a queue using a singly linked list.
• Implement enqueue and dequeue operations.
• Demonstrate with at least 8 insertions and deletions.
• Compare advantages of linked list queues over array queues.
3. Double-Ended Queue (Deque)
Implement a double-ended queue (deque) using arrays. Support:
• Insert at front
• Insert at rear
• Delete from front
• Delete from rear
Use this to test whether a given string is a palindrome.
1
Advanced Data Structures and Algorithms Lab ABV-IIITM Gwalior
4. Queue Simulation of Real-Life System
Simulate a CPU job scheduling system using queues:
• Jobs arrive with given arrival time and burst time.
• Use a round robin queue with time quantum = 3.
• Output should include Gantt chart, average waiting time, and turnaround time.
5. Multi-Level Queue Scheduling with Priorities
Design a system with two queues:
• Queue 1 → High-priority tasks (handled using a priority queue).
• Queue 2 → Normal tasks (handled using a FIFO queue).
Jobs arrive randomly with given priority, burst time, and arrival time.
• Execute all high-priority jobs first, then normal jobs in round robin order.
• Display execution order, waiting time, and turnaround time.
— End of Assignment —