|
Answer» Data STRUCTURES are divided into 2 types based on the shape/ based on the arrangement of the data elements. They are Linear Data Structures and Non-Linear Data Structures. | Linear Data Structure | Non-Linear Data Structure |
|---|
| Data elements are arranged in a sequential/ linear fashion. | Data elements are arranged in a hierarchical/ non-linear fashion. | | We can traverse all elements without storing visited elements in a SINGLE traversal. | We cannot traverse all elements without storing visited elements in a single traversal. | | Only the next element and/or PREVIOUS element is connected to current the element. | Any number of elements can be connected to a single node. | | Easier implementation than Non-Linear Data Structures. | Implementation is more COMPLEX than Linear Data Structures | | Only a single level is involved. | Multiple levels are involved. | | Examples: Array, Linked List, Stack, Queue etc. | Examples: TREES, Graphs, Trie etc. |
|