A data structure is a method of arranging data in a computer that allows it to be used effectively. Let's see the different types of data structures used in real-life.

**Arrays**

It is most used data structure. It is used in every possible situation where you need to gather similar objects at one place.

Applications of Arrays

- The contact applications in our phone which we use in our daily life has a lot of contacts. These contacts are stored in the form of an arrays. When we add or delete a contact it is similar to inserting/deleting an array.
- Songs playlist in our music player.
- These are also used in the online ticket booking system if a user wants to book a seat in S-9, the array becomes seat[S][9].

**Hash Table**

Hash Table only store data that has a key associated with it. Operations like Inserting and Searching are easily manageable while using Hash Tables.

Applications of Hash Table

- They can be used to implement caches mainly used to that are used to speed up the access to data.
- Hash is a not just used in data structure, but also widely used in security, cryptography, graphics, audio.
- The hash functions are used in various algorithms to make their updating and storing computing faster.

**Linked Lists**

**Single Linked List**

Collection of element called nodes that are stored haphazardly in the memory. Node has two parts. One which store data at a specific address and the other is a pointer that contains the address of the next node. The last node contains the pointer to NULL.

Applications of Single Linked List

- UNDO, REDO or DELETE operations
- Viewing photos continuously one after the other in a photo viewer.
- Skip to the next track option in a music player.

**Double Linked List**

It is a type of linked list in which a node contains a pointer to the previous and the next node in a sequence.

Applications of Double Linked List

- It is usually used in card games to represent the deck of cards.
- Implementing backward and forward navigation in the web browsers.
- UNDO and REDO functions in notepad or some other applications.

**Stack**

A Stack is defined as a linear list in which insertions and deletions take place at the same end based on the Last-In-First-Out(LIFO) strategy. This end is called the top of the stack and the other end is called the bottom of the stack.

Applications of Stack

- To check for left and right parenthesis match in an expression.
- To evaluate a post fix expression.
- Store the return address in a function call-return structure of a compiler.

**Queues**

A queues is a linear list in which additions and deletions take place at two different ends. Insertions take place at the rear end and deletions take place in the front-end.

Applications of Queues

- Priority queues are used in browser while downloading multiple files.
- Used by printer software.
- CPU for task scheduling.

**Trees**

Trees are hierarchical structures that have a single root node.

Applications of Trees

- Implementation of navigation in website or applications.
- Trees structures are also used in Domain Name Server(DNS).
- In various games which come across decision-making steps.

**Graphs**

A graphs in which every edge is directed is called a digraph. A graph in which every edge is undirected is called a undirected graph or simply a graph.

Applications of Graphs

- The shortest path between two points can be found using graphs.
- Used in various e-commerce websites for user preferences.
- Used by Network-based platforms for interconnections.

**Recursion**

The process in which a function calls itself directly or indirectly is called recursion and corresponding function is called a recursion function.

Properties

- Performing the same operations multiple times with different inputs
- In every step, we try smaller inputs to make the problem smaller
- Base condition is needed to stop the recursion otherwise infinite loop will occur

**Sorting**

A Sorting Algorithm is used to rearrange a given array or list elements according to a comparison operator on the elements.

Properties

- Space complexity
- Adaptability
- Speed for better time complexity

**Searching**

Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is sorted.

**Dynamic Programming**

Dynamic Programming is a technique that breaks the problems into sub-problems, and saves the result for future purposes so that we do not need to compute the result again.

## Top comments (0)