# What is Data Structures & What is an Algorithm ? Why do we need Data Structures & Algorithms ?

Understand the meaning of Data Structures & Algorithms in detail in this post. We will study what is a data structure and why we need data structures. We will also take a detailed explanation about what is an algorithm and how it works.

##### What is a Data Structure ?

Data Structures is one of the most fundamental subject in Computer Science & in-depth understanding of this topic is very important especially when you are into development/programming domain where you build efficient software systems & applications.

###### Definition –
• In computer science, a data structure is a data organization, management and storage format that enables efficient access and modification.
###### In Simple Words –
• Data Structure is a way in which data is stored on a computer.

Data structure is a particular way of storing and organizing information in a computer so that it can be retrieved and used most productively.

• Each Data Structure allows data to be stored in specific manner.
• Data Structure allows efficient data search and retrieval.
• Specific Data structures are decided to work for specific problems.
• It allows to manage large amount of data such as large databases and indexing services such as hash table.
##### What is an Algorithm ?
###### Dictionary Definition –

A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

###### Formal Definition –

An algorithm is a finite set of instructions that are carried in a specific order to perform specific task.

###### Algorithms typically have the following characteristics –
• Inputs : 0 or more input values.
• Outputs : 1 or more than 1 output.
• Unambiguity : clear and simple instructions.
• Finiteness : Limited number of instructions.
• Effectiveness : Each instruction has an impact on the overall process.
###### Real world example of an Algorithm –

Algorithm(aka process) to make a lemonade –

1. Cut your lemon in half.
2. Squeeze all the juice out of it that you can.
3. Pour your juice into a container with 1/4 cup (2 oz) sugar.
5. Stir your solution until sugar dissolves.
6. Fill up container with water and add ice.