0% found this document useful (0 votes)
12 views

Lab 04 - Queue

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Lab 04 - Queue

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Data Structures and Algorithms

Lab 04 – Queue
Exercises/Tasks:

1. Create a Queue using Array. Implement all the required methods (enqueue, dequeue,
getFront, getSize, isEmpty, isFull, and printAll (print from front-to-rear order)). Besides,
show the functionality of the Queue by calling its diGerent methods in the main
method.
Note: Make the queue circular so that insertion should occur if a place is free anywhere
in the array.
2. Create a Queue using Linked List. Implement all the required methods (enqueue,
dequeue, getFront, getSize, isEmpty, and printAll (print from front-to-rear order)).
Besides, show the functionality of the Queue by calling its diGerent methods in the main
method.
3. Create a queue using two stacks. Implement all the required methods of Queue and
show their working in the main method.
4. Write a program to sort a Queue.
5. Any 3 task from leetcode related to Queue.

You might also like