Advanced Java Tutorial


Total available pages count: 55
Subject - Java Technologies

Queue

A queue is a linear data structure with abstract data type which depicts First in First Out (FIFO) behavior. It can be defined as an ordered list that allows inserting operation to be performed at one end is known as REAR & delete operation to be performed at the end known as FRONT.
 
 

the insertion of an element can be performed from the Rear end
the deletion of an element can be performed from the Front end

 

Operation

Enqueue()
Add element at the rear end of the queue

Dequeue()
Delete the element at the front end of the queue

Peekfirst()
Used to get the first element of the queue

Peeklast()
Used to get the last element of the queue
 



Comments