What is Data Structure?

A data structure is a way in which we can store the data in computer so that it can be used effectively. For Example, we can store a list of items having the same datatype using the array. We can store data by using stack, queue and link list. It is used in area of artificial intelligence, operating system, graphics, etc. It stores object and allow their manipulation on the basis of two different types:

Linear data structure

Non-linear data structure

1. Linear data structure: When the data is stored in linear way, it is known as linear data structure. Type of linear data structure is : Arrays, Stack, Linked list and Queues.

a).Arrays: Array is type in which we can store the data of same data type. For example of we store data of integer then whole data should be integer.

b).Stack: Stack is type in which we can store data from one end known as Top and can remove from same end. There is no other end. Hence, it is also known as LIFO or FILO i.e. Last In First Out or First In Last Out.

c).Queues: Queue is type in which we can store data from one side and can remove from other side. There are two ends. Hence, it is also known as FIFO or LILO i.e. First in first out or Last in Last out.

d).Linked List: When the data is linked with each other, then it is linked list. Here first value in data is linked with head.

2. Non-Linear data structure: When the data is store in non linear way then it is known as non-linear type. Type of Non-linear is: Tree, Graphs, Table and Sets. Hello!👋