Download Data Structure

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Data Structure
M.S.C.:Esraa A.H.
Introduction To Data Structure
Computing is all about handling data. And that data needs to be
organized in a logical manner for the task in hand.
The tool that are used for store the data into computer very significant
manner also retrieve this stored data very fast is data structure, so data
structures helps in data operations like storing data and searching data.
Data Structure
A data structure is a particular way of storing and organizing data in a
computer so that it can be used efficiently. Data structures provide a means
to manage huge amount of data efficiently, such as large databases and
internet indexing services.
Data
Data means value or set of values. In both the singular and plural form,
this term is data. Following are some examples of data.
1- 34
2- 26/8/2013
3- IsBN81-203-0000-0
4- | | |
5- Pascal
6- AE
7- 21, 25, 28, 30
Information
Information is symbolic representation. It has some useful meaning that
helps us in making good judgments. In other words, information can be
defined as meaningful data or processed data. All data term become
information if impose the meaning as mentioned below related to a person:
Babylon University-Uloom Collage for Women-Computer Department-Second Class
Data Structure
M.S.C.:Esraa A.H.
Data
Meaning
34
26/8/2013
IsBN81-203-0000-0
| | |
Age of the person
Date of birth of the person
Book number, recently Published by the person
Number of a wards achieved by the person in tally
mark
Nick name of the person
Signature of the person
Important ages of the person
Pascal
AE
21, 25, 28, 30
Data Type
A data type is a term which refers to the kind of data that may appear in
computation. Following are a few well-known data types.
Data
34
26/8/2013
IsBN81-203-0000-0
| | |
Pascal
AE
21, 25, 28, 30
Data Type
Numeric(integer)
Date
Alphanumeric
Graphics
String
Image
Array of integers
What does organizing the data mean??
It means that the data should be arranged in a way that it is easily
accessible. The data is inside the computer and we want to see it. We may
also perform some calculations on it. Suppose the data contains some
numbers and the programmer wants to calculate the average, standard
deviation. May be have a list of names and want to search a particular name
in it. To solve such problems, data structures and algorithm are used.
Babylon University-Uloom Collage for Women-Computer Department-Second Class
Data Structure
M.S.C.:Esraa A.H.
Algorithms and Program with Data Structure
Algorithms are used to manipulate the data contained in these data
structures as in searching and sorting.
Algorithm is a finite sequence of instructions, each of which has a clear
meaning and can be performed with a finite amount of effort in a finite
length of time. An integer assignment statement such as x:=y+z is an
example of an instruction that can be executed in a finite amount of effort.
Program is an instantiation of an algorithm in a computer programming
language.
We must distinguish between the algorithm and the program. To write
the program, there is some condition must be applied that depend on the
programming language that used but in algorithm there is no a specific
programming rules must applied except the standard form of the algorithm.
The algorithm must have the following form:
Algorithm : the name of algorithm
Inputs : write here the inputs of algorithm.
Outputs : the outputs of algorithm.
Begin
{
The body of algorithm (the solution)
}
End
Babylon University-Uloom Collage for Women-Computer Department-Second Class
Data Structure
M.S.C.:Esraa A.H.
Types Of Data Structure
Data structure
Linear data structure
Array
Stack
Queue
Non-linear data structure
List
Trees
graphs
Data structures are classified into two main classes: linear data structures
and non-linear data structures. In case of linear data structures, all the
elements form a sequence or maintain a linear ordering. On the other hand,
no such sequence in elements, rather all the elements are distributed over a
plane in case of non-linear data structure.
How to choose the suitable data structure
For each set of data there are different methods to organize these data in
a particular data structure. To choose the suitable data structure, we must
use the following criteria.
1- Data size and the required memory.
2- The required time to obtain any data element from the data structure.
3- The programming approach and the algorithm that will be used to
manipulate the data.
Babylon University-Uloom Collage for Women-Computer Department-Second Class