Skip to main contentSkip to solution

Solution

✅ Correct Option: 4

A queue removes elements in the order they were added: the first element inserted is the first one removed. This is the FIFO (First In, First Out) approach, like people waiting in a line, where the person who arrives first is served first.


Options 1 and 2: LIFO (Last In, First Out) and FILO (First In, Last Out) describe a stack, where the most recently added element is removed first.

Option 3: LILO (Last In, Last Out) is only another way of saying FIFO in effect, but it is not the standard term used for a queue.

Keyboard Shortcuts

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