queue in stl code example
Example 1: restting a queue stl
// To clear the queue Q defined as "queue<int> Q"
Q = queue<int>();
Example 2: stl queue
Functions used here:
q.size() = Returns the size of queue.
q.push() = It is used to insert elements to the queue.
q.pop() = To pop out the value from the queue.
q.front() = Returns the front element of the array.
q.back() = Returns the back element of the array.