What are some operations performed by Queue data structure?

The queue data structure follows the FIFO (First In First Out) principle where elements that are added first will be removed first.

Operations performed by Queue are:-

  1. enque() inserts an element at the back of the queue

  2. deque () removes an element from the front of the queue

  3. getFront() returns the first element of the queue

  4. getBack() returns the last element of the queue

  5. size() returns the number of elements in the queue

  6. empty() returns true if the queue is empty