Question:

Which of the following is a linear data structure ?

Show Hint

If you can visualize the data elements arranged in a single straight line, it's a linear structure. If it looks like a tree or a web, it's non-linear.
  • Array
  • AVL Tree
  • Binary Tree
  • Graph
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Define linear vs. non-linear data structures.

Linear data structures store elements in a sequential order. Each element has a unique predecessor and successor (except the first and last). Examples include arrays, linked lists, stacks, and queues.
Non-linear data structures store elements in a hierarchical or networked manner, where an element can be connected to multiple other elements.

Step 2: Classify the given options.

(A) Array: Stores elements in contiguous memory locations, one after another. It is a linear structure.
(B) AVL Tree and (C) Binary Tree: Hierarchical structures where a node can have multiple child nodes. They are non-linear.
(D) Graph: A collection of nodes (vertices) and edges that connect them, representing complex relationships. It is a non-linear structure.
Therefore, the array is the linear data structure among the choices.
Was this answer helpful?
0
0