queue ds c++ code example
Example: queue c++
The functions supported by queue:
---------------------------------
empty() | Tests whether queue is empty or not.
size() | Returns the total number of elements present in the queue.
push() | Inserts new element at the end of queue.
emplace() | Constructs and inserts new element at the end of queue.
pop() | Removes front element of the queue.
swap() | Exchanges the contents of queue with contents of another queue.
front() | Returns a reference to the first element of the queue.
back() | Returns a reference to the last element of queue.