Skip to main contentSkip to solution

Multiple chairs in a vertical pile is an example of which of the following data structure?

Solution

✅ Correct Option: 1

A pile of chairs stacked vertically follows LIFO (Last In, First Out): the chair placed last on top is the first one removed, and you cannot take one from the middle or bottom without removing those above it. This is exactly how a stack works, with push and pop happening at one end (the top).


Queue: follows FIFO, with insertion at the rear and removal from the front, like people standing in a line.

Deque: allows insertion and removal at both ends, which a vertical pile does not allow.

Remember the everyday examples: stack of plates, books or chairs is a stack, and a ticket line is a queue.

Keyboard Shortcuts

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