elements of data.
Data structure mainly specifies the structured organization of data, by
providing accessing methods with correct degree of associativity. Data structure affects the design of both the structural and functional aspects
of a program. Algorithm + Data Structure = Program
Data structures are the building blocks of a program. The programmers have to strive hard to solve these problems. If the problem is analyzed and divided into sub problems, the task will be
much easier i.e., divide, conquer and combine.
A complex problem usually cannot be divided and programmed by set of
modules unless its solution is structured or organized.
Thi is because when we divide the big problems into sub problems, these sub
problems will be programmed by different programmers or group of programmers. But all the programmers should follow a standard structural method so as to
make easy and efficient integration of these modules.
Such type of hierarchical structuring of program modules and sub modules
should not only reduce the complexity and control the flow of program statements but also promote the proper structuring of information. By choosing a particular structure (or data structure) for the data items, certain
data items become friends while others loses its relations.
The representation of a particular data structure in the memory of a computer
is called a storage structures.
That is, a data should be represented in such a way that it utilizes maximum
The data structure can be represented in both main and auxciliary memory of
A storage structures representation in auxiliary memory is often called a file
It is clear from the above discussion that the data structure and operations on
organized data items can integrally solve the problem using a computer Data Structure = Organized Data + Operations
Algorithm is a step-by-step finite sequence of instruction, to solve a well-
defined computational problem.
That is, in practice to solve any complex real life problems; First we have to define the problems. Second step is to design the algorithm to solve that problem. Writing and executing programs and then optimizing them may be effective
for small programs.
Optimization of a program is directly concerned with algorithm design. But for a large program, each part of the program must be well organized
before writing the program.
There are few steps of refinement involved when a problem is converted to
This is called stepwise refinement method.
There are two approaches for algorithm design
Top-down and bottom-up
We can write an informal algorithm, if we have an appropriate mathematical
model for a problem.
The initial version of the algorithm will contain general statement, Informal
Then we convert this informal algorithm to formal algorithm that is, more
definite instructions by applying any programming language syntax and semantics partially. Finally a program can be developed by converting the formal algorithm by a
programming language manual.
From the above discussion we have understood that there are several steps to
reach a program from mathematical model.
In every step there is a refinement (or conversion). That is to convert an informal algorithm to a program, we must go through
several stages of formalization until we arrive a program - whose meaning is formally defined by a programming language manual – is called stepwise refinement techniques.
Modular Programming is heavily procedural.
The focus is entirely on writing code (functions).
Data is passive in Modular Programming.
Any code may access the contents of any data structure passed to it. (There is
no concept of encapsulation.)