Question:

Which of the following is a linear data structure?
(A) Deque
(B) Queue
(C) Stack
(D) Tree
Choose the correct answer from the options given below:

Show Hint

Linear means items sit in one sequence. A tree has branches, so it is non-linear.
Updated On: Oct 1, 2026
  • (A), (B) and (C) only
  • (A), (B) and (D) only
  • (A), (B), (C) and (D)
  • (B), (C) and (D) only
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understanding the Concept:
A linear data structure stores items one after another in a sequence. Each item has at most one item before it and one after it. Stacks, queues, deques, lists and arrays are linear. A structure with branches is non-linear.

Step 2: Check (A) Deque.
A deque (double-ended queue) keeps items in a line and allows insertion and deletion at both ends. It is linear. So (A) is TRUE.

Step 3: Check (B) Queue.
A queue keeps items in a line with insertion at the rear and deletion at the front. It is linear. So (B) is TRUE.

Step 4: Check (C) Stack.
A stack keeps items in a line with insertion and deletion at one end (the top). It is linear. So (C) is TRUE.

Step 5: Check (D) Tree.
A tree has a root and each node can have many children. Items are in levels and branches, not in one sequence. It is non-linear. So (D) is FALSE.

Step 6: Match with the options.
The linear ones are (A), (B) and (C). That is option 1. Options 2, 3 and 4 all include (D), which is not linear.

Step 7: Final Answer:
Deque, Queue and Stack are linear: option 1. \[ \boxed{\text{(A), (B) and (C) only}} \]
Was this answer helpful?
0
0