Data Structures :-
- It is the collection of related data with accessing mechanism.
- To store and manage a number of data we have to use the concept of data structures.
- There are many data structures used in computer programming , these are :-
The data structure in which all the elements can be accessed linearly from beginning to the end is called linear data structure.
To access the elements in linear data structure is very simple.
e.g. Array, Queue, Stack
Non-linear Data Structure :-
The data structure in which we can't access all the elements sequentially from beginning to the end is called non-linear data structure.
In non-linear data structure to access an element is more difficult than linear data structure.
e.g. Tree, Graph
Homogenous Data Structure :-
The data structure in which all the data elements are of same type, is called homogenous data structure.
e.g. Array
Heterogenous Data Structure :-
The data structure in which atleast one of the data element is different is called heterogenous data structure.
e.g. Structure, Union
Types of data structure according to memory allocation :-
- Contiguous data structure
- Non-contiguous data structure
Contiguous Data Structure :-
The data structure in which all the data elements are allocated in memory continuously i.e just one after other is called contiguous data structure.
e.g. Array
Non-contiguous Data Structure :-
The data structure in which all the elements are not stored continuously i.e not just one after other is called non-contiguous data structure.
e.g. Linked list
1 Comments
Very good information. Thanks
ReplyDeleteTell us your queries or more topics which you want