Skip to main contentSkip to solution

Solution

✅ Correct Option: 2

A queue follows FIFO (First In, First Out). Elements are added at the rear and removed from the front, so the element that entered first is the first to leave, like people standing in a line.


Options 1 and 3: LIFO (Last In, First Out) and FILO (First In, Last Out) mean the same thing and describe a stack, not a queue.

Option 4: random access means any element can be reached directly by its index, as in an array. A queue only allows removal from the front.

Keyboard Shortcuts

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