# Data Structures and What is the use of it in real world.

--

Data structure is used in many things but a lot of people don’t realize it.

**Data structures** has a lot of use wether its for the code and functions or interviews you will do or solving problems in mathematical way.

There are a lot of structures out there that may help you with your coding and sometimes you already used the structures without even knowing it. For example if you are dealing with JS dom then you already dealt with trees.

Types of structures

- Binary Search Tress
- Queues
- Singly Linked List
- Binary Heaps
- Hash tables
- Stacks Directed Graphs

And many more…

For Interviews they ask about how would you deal with certain datas and what structures would you use. A lot more other questions related to Data Structures gets asked in interview. You could save time and a lot of storage by using the proper structures. The more you save time and storage the more money you could save.

Mathematically speaking the way of sorting and arranging the data you have to have a proper solution like for example.

If you have 53 socks in three different colors how many socks would you need pick inside a bag in order to find a pair of the same color in the least amount of picks. Then the answer will be 4 for the worst case scenario and for the best case scenario it is 2. This is a simple example but if you think of trillions of data out there that needs to be handled data structures will help in a huge way.