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

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

Explanations:

A non-linear data structure stores elements in a hierarchical or network relationship, not sequentially.

Linear data structures

Elements are arranged in sequence (one after another):

  • Stack

  • Queue

  • Array

These are linear, not non-linear.

Non-linear data structures

Examples:

  • Tree

  • Graph

Check the options

  • (A) Stack → Linear ❌

  • (B) Queue → Linear ❌

  • (C) Array → Linear ❌

Since none of the given options are non-linear, the correct answer is:

(E) None of the above.

OOps! You are currently offline.