-
Notifications
You must be signed in to change notification settings - Fork 7
Queue
Removes all elements from queue.
Precondition : it requires the name of the queue.
Example : queue erase fruits
It creates a new queue.
Precondition : it requires the name of the queue
Example : queue create fruits
Note : The created queue will be in the global scope. Under the hood it is an array.
Removes the next element from the queue.
Precondition : it requires the name of the queue.
Example : queue dequeue fruits
It destroys the queue.
Precondition : it requires the name of the queue.
Example : queue destroy fruits
It put an element to queue.
Precondition : it requires the name of the queue and the element.
Example : queue enqueue fruits apple
Returns whether the queue is empty.
Precondition : it requires the name of the queue.
Example : queue empty fruits
Returns the next element from the queue.
Precondition : it requires the name of the queue.
Example : queue peek fruits
Returns the number of elements in the queue.
Precondition : it requires the name of the queue.
Example : queue size fruits