Which of the following data structures stores elements in a non-linear relationship?

Asked In: BPSC TRE 3.0

Options

  • A. Stack
  • B. Queue
  • C. Array
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

E. None of the above

Detailed Explanation

A non-linear data structure organizes elements in a hierarchical or network-like relationship rather than a sequential one. Trees and graphs are common examples of non-linear data structures. Stack, queue, and array are generally classified as linear data structures because their elements are arranged sequentially. Therefore, for the options given in this question, none of A, B, or C represents a non-linear data structure. The correct answer is None of the above.