Cards (10)

  • Queue
    • Linear data structure First in, First Out principle.
  • Queue in C++ (using STL)
    • C++ provides a built-in queue container in the Standard Template Library (STL), which allows easy implementation 
  • STL(push(x))
    Adds an element x to the back of the queue (enqueue).
  • STL(pop())
    Removes the front element of the queue (dequeue).
  • STL(front())
    Returns the front element of the queue.
  • STL(back())
    Returns the last element of the queue.
  • STL(size())
    Returns the number of elements in the queue.
  • STL(empty())
    Returns true if the queue is empty, otherwise false.
  • Queue
    First element inserted into the queue is the first one to be removed.
  • Empty
    returns true if the queue is empty, otherwise false