Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C code to make a queue. #218

Closed
Vibhav-Sharma opened this issue Oct 2, 2024 · 2 comments
Closed

C code to make a queue. #218

Vibhav-Sharma opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
DSA Hacktoberfest contribute for hacktoberfest 2024

Comments

@Vibhav-Sharma
Copy link
Contributor

Implement a Queue using a Doubly Linked List

You are required to implement a queue data structure using a doubly linked list. Your implementation should support the following operations:

Enqueue: Add an element to the rear of the queue.
Dequeue: Remove and return the element from the front of the queue.
Print: Display the current elements in the queue from front to rear.
Input Format:

The first line contains an integer
𝑛
n representing the number of elements to enqueue.
The second line contains
𝑛
n space-separated integers representing the elements to be added to the queue.
Output Format:

After enqueuing all elements, print the queue.
Dequeue all elements and print each dequeued element.
Finally, print the queue again, which should now be empty.

@Vibhav-Sharma
Copy link
Contributor Author

@Saloni6111 please assign me this, and give the label too

@Saloni6111 Saloni6111 added Hacktoberfest contribute for hacktoberfest 2024 DSA labels Oct 2, 2024
@Saloni6111
Copy link
Owner

@Saloni6111 please assign me this, and give the label too

done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSA Hacktoberfest contribute for hacktoberfest 2024
Projects
None yet
Development

No branches or pull requests

2 participants