Question:

Which one of the following is NOT a linear data structure?

Show Hint

The easiest way to identify a linear data structure is to see if you can naturally arrange its elements in a single line or sequence. Arrays, linked lists, stacks, and queues fit this description. Trees and graphs do not.
Updated On: Jul 2, 2026
  • Array
  • Stack
  • Queue
  • Tree
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Data structures can be classified as linear or non-linear.
Linear Data Structures: Elements are arranged in a sequential or linear order. Each element has at most one predecessor and one successor.
(A) Array: Elements are stored in contiguous memory locations, forming a sequence. It is a linear structure. (B) Stack: A list of elements where insertion and deletion occur at one end. Logically, it's a linear sequence. (C) Queue: A list of elements where insertion occurs at one end and deletion at the other. Logically, it's a linear sequence.
Non-Linear Data Structures: Elements are not arranged sequentially. An element can be connected to multiple other elements.
(D) Tree: A hierarchical structure where elements (nodes) are connected in a parent-child relationship. A node can have multiple children, so the structure is non-linear. Graphs are another example of non-linear structures.
Therefore, a Tree is not a linear data structure.
Was this answer helpful?
0
0