What are the types of Data Structures?
There are two types of Data structures -
Linear Data structure: If the elements of a data structure result in a sequence or a
linear list then it is called a Linear data structure. Every data element is connected
to its next and sometimes previous element in a sequential manner.
Example - Arrays, Linked Lists, Stacks, Queues, etc.
Non-linear Data structure:
If the elements of a Data structure result in a way that the traversal of nodes is
not done in a sequential manner, then it is a Non-linear data structure.
Its elements are not sequentially connected, and every element can attach
to another element in multiple ways. Example - Hierarchical data structure like trees.