Subscribe Us

header ads

Introduction to Data Structures and its types

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 :-
    1. Array
    2. Queue
    3. Stack
    4. Linked List
    5. Tree
    6. Graph
    7. Structure
    8. Union

  • In programming the data structure can be of following types :-
    1. Linear data structure
    2. Non-linear data structure
    3. Homogenous data structure
    4. Heterogenous data structure

Linear Data Structure :-
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 :-
    1. Contiguous data structure
    2. 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

Post a Comment

1 Comments

Tell us your queries or more topics which you want