Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 47

Algorithm -Definition

Properties of an algorithm
Development of an algorithm
Data Structures and Algorithms
The Design of efficient algorithm needs an appropriate Data
Structures.

A clear unambiguous set of instructions to be followed

Example

Telephone Directory

Searching a name in the telephone Directory


Data Structures and Algorithms
Definition and Classification
Classification
Arrays
Array a[i] - a – name of the array
i- Subscript
Square brackets
Example of an Array
Store (A, i,N)

Where A- Name of the Array


i- Represents the position
N- represents the value
Array Operations
Types of Arrays
A( -1:26)= 28
-1 0 1 2 26

U-l+1
26-(-1)+1
26+1+1= 28
Two Dimensional Array
Size of two dimensional Array
Example
Multi Dimensional Array
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory
Representation of Arrays in Memory

You might also like