The following operations make a array an ADT. Insertions and deletions in the array must follow the FIFO scheme.
For simplicity we assume the elements are integers.
-
Main Queue Operations
- EnQueue(int data): Inserts an element at the end of the array
- int DeQueue(): Removes and returns the element at the front of the array
-
Auxiliary Queue Operations
- int Front(): Returns the element at the front without removing it
- int QueueSize(): Returns the number of elements stored in the array
- int IsEmptyQueueQ: Indicates whether no elements are stored in the array or not
There are several ways in which a array can be implemented and they are implemented in the following folders.