In this tutorial we will start with introduction to data structure why Data Structure is used and data structures different types so let’s begin with topic.
As a name Data Structure implies the data means information of any kind and the structure means arrangement, that is arrangement of data.
The Definition of Data Structure
- Unsequence sentences or information can be arranged in a particular format is known as data structure.
- The definition of Data structure of states that on the a data we have it is stored in a particular format
Why data structure used?
- Using of data structure we can allow the information stored on disk very efficiently.
- As a data stored in a particular (efficient way), it is easy to access data as well as for a processing the data.
- It is a secure way to store the data.
- It provide better management of a data.
Now we know what is a data structure and why it is used now we will see the different type of a data structures.
Types of data structure:-
As a data structure arranges the data in a particular format there are many data structure to implement that.
- Linked list
Linear data structure:-
In this type of data structure the data is traversed in sequential way, That is we can access only one element.
Example:- Array, Linked list, Stack, Queue.
- Array is a Linear type of data structure.
- As it is a linear it’s a sequential access as well.
- The arrangement of data in array is in systematic order.
Example:- int array;
- The stack is also Linear type of data structure.
- It works on LIFO(Last In First Out) Manner.
- Queue is also Linear type of data structure.
- It works on FIFO(First In First Out) Manner.
Example:- Ticket Counter
4) Linked list:-
- It is also a linear type of data structure.
- Data is stored as node with address of next node.
Non linear data structure:-
In this data structure the data is stored in a unsequential order and can also retrieve (access) from anywhere.
The tree is a set of node which has a starting node called as an root node and all other connected with that node to form a tree.
The graph is a set of node connected with edges.