XtGem Forum catalog

1. Stack : A stack/Pile/push-down lists a linear structure in which items may be added or removed only at the end. This means, the last item to be added to a stack is he fiorst item to be removed. Stacks are also called last-in first-out (LIFO) lists.

    (a). Push : Insert an element into a stack.

    (b). Pop : Delete an element from a stack.

2. Queue : A queue is a linear list in which items may be added only at one end and items may be removed only at the other end. Queues are also called first-in first-out (FIFO) lists.

    (a). Front : one end where only deletions can take place.

    (b). Rear : other end where only insertion can take place.

3. Deque : A deque(double-ended queue) is a linear list in which elements can be added or removed at either end but not in the middle.

4. Priority Queue : A priority queue is a collection of elements such that each element has been assigned a priority and such that the order in which elements are deleted and processed comes from the following rules :
    (1) An element of higher priority is processed before any element of lower priority.
    (2) Two elements with the same priority are processed according to the order in which they were added to the queue.