## Data Structures and Algorithms

## Data structures and Algorithms (DSA) in Computer Science

It is believed that data structures and algorithms are the basics of computer science. It is actual computer science.

Any developer or CS student must write code that provides a required output.

Algorithms are methods to implement certain tasks while Data structures are like hands for algorithms to make recipes.

Using a combination of data structure and algorithms, we can improve the performance of programs drastically.

## What is a Data?

To understand data structures, we must first understand data.

In the modern world, data and its information is an essential part, and various implementations are being made to store in different ways.

Data is just a collection of facts and figures, or you can say data are values or a set of values that are in a particular format. A data item refers to a single set of values.

In every programming language, we have some data types. For example, we have some data which has, player’s name “Max” and age 28. Here “Max” is of String data type and 28 is of Integer data type.

## Data structures and Algorithms

## Data Structures :

Suppose you go to the library and want to find a book on the 5th edition DSA, youâ€™d go to the CS section. From there, youâ€™d find the designated area set aside for DSA, then go through the books, sorted in chronological order, until you find the 5th edition.

Now, consider books as your data, and the libraryâ€™s *method of sorting the books as the data structure*, and youâ€™re all set! In short, a data structure is a specific means of organizing data in a system to access and use.

### Defining Data Structures

Data Structure can be defined as an arrangement of a collection of data items so that they can be utilized efficiently and the operations on data can be done efficiently.

Therefore, Data Structure is all about the arrangement of data and efficient operations on the data. But the question is where is it used? The answer is, inside the main memory, during the execution of a program.

AnÂ **algorithm**Â is a procedure that completes a task, like eating fish. AÂ **data structure**Â defines a contract for storing, retrieving, and manipulating the data inside it.

Choosing the rightÂ **data structure**Â for anÂ **algorithm** is critical for its success.