Which data structures are considered linear?
2024
Which data structures are considered linear?
Answer: C. Stack — Data structures are classified as linear or non-linear based on how elements are arranged. Linear Data Structures In linear structures, elements are arranged…
- A.
Binary tree
- B.
Graph
- C.
Stack
- D.
More than one of the above
- E.
None of the above
Attempted by 3110 students.
Show answer & explanation
Correct answer: C
Data structures are classified as linear or non-linear based on how elements are arranged. Linear Data Structures In linear structures, elements are arranged sequentially, one after another. Examples include arrays, linked lists, stacks, and queues. Access is typically done in a single pass. Non-Linear Data Structures In non-linear structures, elements are not arranged sequentially. They are connected in a hierarchical or networked manner. Examples include trees and graphs. Analysis of Options Binary tree: Non-linear (hierarchical).
Graph: Non-linear (networked).
Stack: Linear (sequential, LIFO).
Therefore, the Stack is the linear data structure.