Name the two types of data structures and give difference between them.
Data structures are of two types:
(i) Linear
(ii) Non – Linear.
In a linear data structure, the elements are stored in a sequential order.
In a non-linear data structure, no sequential order is followed.
Linear Data Structure Examples: Arrays: Non-Linear Data Structure Examples: Tree, graph lists, stacks, queues, linked lists.