Data Structure is a particular arrangement of data used by computer programs to bring efficiency in execution. It can be broadly classified into linear or non-linear data structures.
The linear data structures are those where elements are stored sequentially. The key characteristics of such structures are:
- Data elements ordered in a linear fashion.
- You can traverse the data in one direction at a single level.
- Memory is contagious ( stored as arrays) or dynamic ( like linked-lists).
Common linear data structures are arrays, strings, queues, stack, and linked-lists.
The non-linear structures are those where elements are not stored sequentially, instead form a hierarchy or a network. The non-linear structures have multiple levels.
The key characteristics of non-linear structures are:
- Data elements are organized as hierarchy or network.
- One can traverse non-linear structures in many ways through their many branches or paths.
- They are complex structures.
Common examples of non-linear structures are trees, graphs, heap, etc.

image source – Data Structures Using C
By R. Krishnamoorthy