Queue
A collection of items in which only the earliest added item may be accessed. A queue is logically a First in first out (FIFO) type of list. In a FIFO queue, the first element in the queue will be the first one out; this is equivalent to the requirement that whenever an element is added, all elements that were added before have to be removed before the new element can be invoked.
Basic operations are adding a new item to the rear of the queue and removing the front item from queue and return it in item.
A queue is a non-primitive linear data structure. It is a homogenous collection of elements in which new elements are added at one end called the rear end, and the existing elements are deleted from other end called the front end.
Posted in Computer Science, Information Technology, Data Structure, Data Structure |
