Name the two types of data structures and give one point of difference between them.
Advertisements
Advertisements
Question
Name the two types of data structures and give one point of difference between them.
Distinguish Between
Advertisements
Solution
The two types are Linear and Non-linear data structures.
| Basis of Difference | Linear Data Structure | Non-linear Data Structure |
|---|---|---|
| Arrangement | Elements are arranged in a sequential order. | Elements are not arranged sequentially. |
| Relationship | Each element is generally connected to its previous and next element. | An element may be connected to multiple elements. |
| Structure | Has a single-level arrangement. | Has a multilevel or hierarchical arrangement. |
| Examples | Array, list, stack, queue, linked list | Tree, graph |
shaalaa.com
Is there an error in this question or solution?
