Data structure 3
Data structure 3
CYS III
SEMESTER :FIVE
ACADEMIC YEAR :2024/2025
MODULE :DATA STRUCTURE AND ALGORITHM
MODULE CODE :CYU 08104
ASSIGNMENT :GROUP NO. 3
LECTURER :ALMASI(MR KABEYA)
SUBMISSION DATE :25 NOV 2024
NO. STUDENT NAME REGISTRATION NUMBER
A queue is an Abstract Data Type (ADT) similar to stack, the thing that
makes queue different from stack is that a queue is open at both its
ends. The data is inserted into the queue through one end and deleted
from it using the other end. Queue is very frequently used in most
programming languages.
For example imagine a line of people waiting for a bus; the person who
arrives first gets on the bus first.
a. START
d. If the queue is not full, increment rear pointer to point the next
empty space.
e. Add data element to the queue location, where the rear is
pointing.
f. Return success.
g. END
a. START
f. Return success.
g. END
For example: When the system processes these alerts, it removes
them from the front of the queue.
a. Time Complexity
Array-Based Queue:
1. Data_Structures_and_Algorithms_in_Java_6.pdf
3. www.tutorialspoint.com/data_structures_algorithms/dsa_queue.html
4. https://www.w3schools.com/dsa/dsa_data_queues.php