Good judgment comes from experience, and experience comes from bad judgment. Frederick P. Brooks

Queue using Linked list

Language Java | Level Intermediate | Category Data structure | August 30, 2015 4:07 pm


Data structure Description

The queue is a data structure which process items using first in first out (FIFO) strategy. The queue has head and tail nodes. When the item inserts into the queue, the queue adds the items in the tail. The linked list store the next element address to the current node for identifying the next node. The last element linked list next node store NULL address.

Write a program to implement queue data Structure using linked list.


Output

   					 
Enqueue items in the queue linked list: 34, 44, 99, 11, 345
Items in the queue linked list: 34, 44, 99, 11, 345
Dequeue item in the queue linked list: 34
Dequeue item in the queue linked list: 44
Items in the queue linked list: 99, 11, 345


				    

Comments


No comments available!

Please login to add comments.