2) Types of Data Structure
2) Types of Data Structure
Structure / Classification of
Data structure
1)Logical & Physical Data structure
2)Primitive & Non primitive Data
structure 3)Linear & Non linear Data
structure 4)Static & Dynamic Data
structure
1
1 & 2) Logical & Physical Data structure
2
3) Primitive Data
●
structure
Primitive data structures are those which
are already implemented & built-in into
●
language
●
Data objects consist of a single unit of
information & do not contain any sub
parts
●
Internal representation of data object is fixed
for specific machine & may vary from one to
another.
3
4) Non Primitive Data Structure
●
It is derived from(made) primitive data
● structure They have lots of units of
● information
It contains group of similar or different
●
data elements.
eg. Array, Structure
4
5) Linear Data structure
●
Elements of LDS are arranged in line.
They form a sequence or a list
●
5
Example 1. Array
●
Array is a collection of similar data elements
in sequntial memory location and it is refer by
common name.
●
int a[ 5 ];
a 10 20 30 40 50
6
Example 2. Linked List
●
It is a collection of same data type
●
But it does not require sequential
memory locations to store the data
7
6) Non Linear data
structure
●
Data is not stored in linear manner
●
Elements have one to many relationship
between them
●
●
Elements do not form a specific sequence
8
Example 1) Tree
●
Trees are usedrepresent data that has some
hierarchical relationship among the data
elements.
9
Tree example 2.
10
Example 2. Graph
●
Graph is used to represent data that
has relationship between pair of
elements.
11
12
7 8.Static & Dynamic data
structure
7. Static Data Structure
●