Data Algorithms and Program
Data Algorithms and Program
Data, Algorithms
& Program
Prof. A.P.Khan
Department of Computer Engineering
D.N.Patel College of Engineering, Shahada
Content
Data
Data Types
Algorithms
Program 2
Introduction to Data
11
Inserting Deleting
It is used to add new data It means to remove (delete) a
items to the given list of data particular data item from the
items. For example, to add given collection of data items.
the details of a new student For example, to delete the
who has recently joined the name of a student who has
course. left the course.
12
Sorting
Data items can be arranged in some order like
ascending order or descending order example,
arranging the names of students in a class in an
alphabetical order, or calculating the top three winners
by arranging the participants’ scores in descending
order and then extracting the top three.
Merging
Lists of two sorted data items can be combined to
form a single list of sorted data items. 13
Abstract Data Type
15
An Algorithm is sequence of unambiguous steps for
solving a problem i.e., for obtaining a required
solution outcome for any valid input in a finite
amount of time
16
A well defined algorithm has five Good
Characteristics
Finiteness. An algorithm must always terminate after
a finite number of steps.
Definiteness. Each step of an algorithm must be
precisely defined; the actions to be carried and
unambiguously specified for each case.
Input. An algorithm has zero or more inputs,
which are given to it initially before the algorithm
begins.
17
Output. An algorithm has one or more outputs i.e,
quantities which have a specified relation to the
inputs.
Effectiveness. An algorithm is also generally
expected to be effective. This means that all of the
operations to be performed in the algorithm must be
sufficiently basic that they can in principle be done
exactly and in a finite length of time.
18
19
Program
22
Steps of Development of Program
25