types of data structure


Types of data structure.



1.       Primitive data structure.
In this data structure we can represent data with the help of basic data type/fundamental data type.
Eg:- int, float, char, double etc.

2.       Non-primitive data structure.
In this data structure we can represent data with the help of user define data type such as array, structure, union, class etc.
 Eg:-
        Struct student
       {
         Int rollnum;
         Char name[20];
       };
This data type can be classified into two parts.
Ø  Linear data structure.
Ø  Non-linear data structure.

Linear data structure.
In this data structure we represent data in linear mode/sequential mode.
Eg:- array, stack, queue, linked list etc.
This data type can be classified into two parts.
a.       Homogeneous data structure.
b.       Non-homogeneous data structure.
Homogeneous data structure.
It is a collection of same type of element.
Eg:- array.
      Non-homogeneous data structure.
It is a collection of  different type of element.
Eg:- structure, union, class.

Non-linear data structure.
In this data structure we can represent data in random order.
Eg:- tree, graph.


if you like my post plz subscribe my blog for next topic.

Comments

Post a Comment

Popular posts from this blog

python pattern programming

Stack

What is function?What is function in python?