## DEV Community π©βπ»π¨βπ» is a community of 963,864 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Catherine Kawara

Posted on

# Data Structures 101: Introduction to Data Structures and Algorithms.

A data structure is a particular way of organizing data in a computer so that it can be used effectively.As developers, we must have good knowledge about data structures as it is a key topic when it comes to Software Engineering interview questions.
The most commonly used data structures include;

1. Arrays
3. Stack
4. Queues

## Algorithms

An Algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output. They are normally independent of any programming language, as they can be implemented in more than one programming language.

### Characteristics of a good algorithm

1. Input β should have 0 or more well-defined inputs.
2. Output βshould have 1 or more well-defined outputs, and should match the desired output.
3. Finiteness β they must terminate after a finite number of steps.
4. Feasibility β Should be feasible with the available resources.
5. Independent β should be independent of any programming code.
6. Unambiguous β Each of its steps, and their inputs/outputs should be clear and must lead to only one meaning.

### Example of an algorithm

Algorithms are mostly writen in a step by step manner. For example, an algorithm to ad two numbers would look something like this

``````Step 1: Start
Step 2: Declare variables num1, num2 and sum.
Step 3: Read values for num1 and num2.
Step 4: Add num1 and num2 and assign the result to sum.
sum=num1+num2
Step 5: Display sum
Step 6: Stop
``````

That is the basic introduction to algorithms, of course this is a much deeper topic which we will continue to explore. Till next time, happy codingβ!