## Difference between Linear and Non-linear Data Structures

Factor |
Linear Data Structures |
Non-linear Data Structures |

Arrangement of Data Element | data elements are sequentially connected | data elements are hierarchically connected |

Travers of Data Element | each data element is traversable with a single run. | data elements are present at many levels |

Examples | Array, Stack, Queue, Link List, etc | Graph, Tree, Map, etc |

Presence on which Level? | all data elements are present at the same and single level. | data elements are present at multiple levels. |

uses memory | not very memory friendly and are not utilizing memory efficiently. | very efficiently |

Time Complexity | increases with an increase in size. | remain with an increase in size. |

Complexity during Implementation | easier to understand and implement. | difficult to understand and implement |

## ImportantÂ MCQs related to Linear and Non-linear Data Structures

**MCQs Question: Which of the following is a Nonlinear data structure?**

(A). arrays

(B). stack

(C). queue

(D). Link list

(E). tree

(F). Graph

(G). Tree and Graph

(H). None of these

(i). All of these

**Which of the following is a linear data structure?**

(A). arrays

(B). stack

(C). queue

(D). array, stack, and queue

(E). Graph

(F). tree

(G). Tree and link list

(H). None of these

(i). All of these

Answer: (D). array, stack, and queue

**Frequently Asked Questions**

**Questions:** Is array linear or non-linear data structures?

Answer: Arrays are linear data structures.

**Questions:** Is Stack linear or non-linear data structures?

Answer: Stack is linear data structures.

**Questions:** Is Queue linear or non-linear data structures?

Answer: Queues are linear data structures.

**Questions:** Is the Link list a linear or non-linear data structure?

Answer: Link lists are linear data structures.

**Questions:** Is tree linear or non-linear data structures?

Answer: A tree is a non-linear data structure.

**Questions:**Is Graph linear or non-linear data structures?

Answer: Graph is a non-linear data structure.