Skip to main contentSkip to solution

Which of the following is a linear data structure?

(A) Deque

(B) Queue

(C) Stack

(D) Tree

Solution

✅ Correct Option: 1

A linear data structure stores elements in a sequence, where each element has one predecessor and one successor (except the first and last). Deque, queue and stack all store elements this way, with insertion and deletion at the ends. So (A), (B) and (C) are linear.


Tree: a non-linear (hierarchical) structure, because one node can have several children.

Keyboard Shortcuts

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