Linear and Non Linear
Linear and Non Linear
댠՛饠䖇萸՛葸՛茨 ՛ ՛ 茨 茨葸
A non-linear data structure has no set sequence of connecting all its
elements and each element can have multiple paths to connect to other
elements. Such data structures supports multi-level storage and often
cannot be traversed in single run. Such data structures are not easy to
implement but are more efficient in utilizing computer memory.
Examples of non-linear data structures are Tree, BST, Graphs etc.
There are two types of data structure available for the programming purpose:
Primitive data structure is a fundamental type of data structure that stores the data
of only one type whereas the non-primitive data structure is a type of data structure
which is a user-defined that stores the data of different types in a single entity.
In the above image, we can observe the classification of the data structure. The data
structure is classified into two types, i.e., primitive and non-primitive data structure.
In the case of primitive data structure, it contains fundamental data types such as
integer, float, character, pointer, and these fundamental data types can hold a single
type of value. For example, integer variable can hold integer type of value, float
variable can hold floating type of value, character variable can hold character type of
value whereas the pointer variable can hold pointer type of value