Data may be organized in many ways the logical or mathematical model of particular organization of data is called a data structure.
The choice of a particular data model depends on two considerations.
- “It must be rich enough in structure to mirror the actual relationships of the data is the real world.”
- The structure should be simple enough that one can effectively process the data when necessary.
Primitive Data Structure: –
Data at their most primitive level within a computer that is the data structure that typically are directly operated upon by machine level instruction.
Non PrimitiveDataStructure: –
A data structure which is used the primitive data structure to build the further one and based on the logic it is called Non-Primitive data structure. Means to say it does not interact directly with machine level transaction.
- Linear Data Structure :-
In linear data structure, data is stored Sequentially using memory locations. A list which displays the relationship of adjacency between elements is said to be linear.
E.g. Array, Stack, Queue and Linked List.
- Non-Linear Data Structure :-
In non-linear data structure, data is not stored Sequentially. A list which dose not have the relationship of adjacency between data element is said to be non-linear data structure.
E.g. Trees and Graphs.