Skip to main contentSkip to solution

Which of the following statement is correct for queue?

Solution

✅ Correct Option: 2

A queue follows FIFO (First In, First Out): the element inserted first is the one removed first. Insertion happens at the rear and deletion at the front, like people standing in a line.


Option 1: a queue is a linear data structure, since elements are arranged in a sequence.

Option 3: Python can handle queues using a list, collections.deque or the queue module.

Option 4: this describes a deque (double-ended queue). In a simple queue, insertion is only at the rear and deletion only at the front.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question