# Introduction to DS

## Introduction to DS

### Introduction to DS

#### Introduction to DS

##### Introduction to DS

###### Introduction to DS

- Problem solving is an essential part of every scientific discipline.

- To solve a given problem by using a computer, you need to write a program for it.

- A program consists of two components:

- Algorithm, and
- Data Structure.

## Role of Algorithms

- The word, algorithm, is derived from the name of the Persian mathematician, Al Khwarizmi.

- An algorithm can be defined as a step-by-step procedure for solving a problem.

- An algorithm helps the user to get the correct result in a finite number of steps.

- An algorithm has five important properties:

- Finiteness
- Definiteness
- Input
- Output
- Effectiveness

## Role of Data Structures

- Multiple algorithms can be used to solve the same problem.

- Some algorithms may solve the problem more efficiently than the others.

- An algorithm that provides the maximum efficiency should be used to solve a problem.

- One of the basic techniques for improving the efficiency of algorithms is to use an appropriate data structure.

- Data structure is defined as a way of organizing the various data elements in memory with respect to each other.

- Use of an appropriate data structure, helps improve the efficiency of a program.

- The use of appropriate data structures also allows you to overcome some other programming challenges, such as:

- Simplifying complex problems
- Creating standard and reusable code components
- Creating programs that are easy to understand and maintain