Data Structure :
Data Structure is nothing but collection of data (or) holding the data in a certain kind.
Types of Data Structures :
Data Structures are two types.
1.Linear Data Structures.
2.Non-Linear Data Structures.
what is linear datastructure ?
values are arranged in certain order.
what is Non-linear datastructure ?
values are arranged in not a certain order.
Linear Data Structure Examples :
1.Array
2.Stack
3.Queue
4.Linked Lists
1.Arrays:
An Array is collection of similar data type of elements.
2.Stack:
It works on (LIFO) last in first out principle.
The elements are inserted in certain order.
Mainly there are two operations in Stack.
1.push ---- nothing but inserting elements
2.pop ---- nothing but deleting elements.
which element is insert last that element should be deleted first.
3.Queue
It works on (FIFO)first in first out principle.
Mainly there are two operations in Queue.
1.push ---- nothing but inserting elements
2.pop ---- nothing but deleting elements.
which element is insert first that element should be deleted first.
4.Linked Lists
Collection of data in a linear fashion.
Mainly it has a two parts.
1st part - Maintaining data.
2nd part - containing next node address.
Non Linear Data Structure Examples :
1.Tree
2.Graph
3.Table
4.Sets
0 comments: