Data Structure-Introduction

INTRODUCTION

Data Structure is a scheme of collecting and organizing data in such a way that we can perform operation on these data in an effective way.
Program = Data Structure + Algorithm

ALGORITHM

It is finite set of instructions to accomplish a particular task.
Its properties are:
1. Input:- It accepts zero or more inputs.
2. Output:- It produces at least one output.
3. Definiteness:- Every instruction is precisely described and clearly specified.
4. Finiteness:- It terminates after a finite numbers of steps.
5. Effectiveness:- The solution prescribed is guaranteed to give a correct answer and that the specified process is faithfully carried out.

FLOWCHART

Flowchart is a pictorial or diagrammatic representation of an algorithm.
The standard set of flowchart symbols are:
Example of Flow Chart

DATA TYPE

Data Type is a well defined collection of data with a well defined set of operations on it.
Example: In C, int is a data type and (+, ­ ,/, *,etc) are the set of its operations.
The different types of data type are:

ABSTRACT DATA TYPE(ADT)

The Abstract Data Type is a data type which is defined in terms of a set of values and a set of operations on it, and hides its implementation specific details. The operations are defined by its inputs and outputs.
Example:­ Stack is an ADT having operations like push(), pop(), etc.

TYPES OF DATA STRUCTURE

There are different types of data structures available. The choice of an appropriate data structure depends on the requirement.