You are on page 1of 2

Data Structure and Algorithm Analysis

Data
Data is derived from a Latin word "Datum" which means collection. So data can be defined as
collection of facts and figures.
Data is classified into two types. f?
1) Group data Item
) !lementar" data Item
1) Group Data Item
Data item that can be subdivided into different segments is called group data item.
#or e$ample% name is a group data item because it can be subdivided into different segments
i.e. #irst name% middle name% last name
2) Elementary Data Item
&he data item that cannot be subdivided into different segments is
called elementar" data item
#or e$ample% 'ccount (o% ID (umber etc.
Field
#ield is the collection of related character. #or e$ample% (ame% )oll (o% *lass
etc. ' single field cannot provide full information about an" entit".
Record
)ecord is the collection of related fields. #or e$ample% the record of student includes its )oll
(o% (ame% *lass% and )egistration (o. etc
Table Relation File
*ollection of related records is called a file or table.
For e!ample
Rno "ame #lass
1 +uhammad ,
rd
-ear
Imran ,
rd
-ear
, .ussain ,
rd
-ear
Data Structure
Data structure is a mathematical wa" for storage of data in the computer memor".
It is the wa" of storing and accessing the data from the computer memor". So that large number of data is
processed in small interval of time%
Types o$ Data Structure
&here are two t"pes of data structure
Linear Data Structure
(on Linear Data Structure
1) %inear Data Structure
/hen the data is to be stored in the memor" in linear form is called linear data structure.
#or e$ample% 'rra"% Stac0% 1ueue% Lin0 List etc.
2) "on %inear Data Structure
1 & I T ' 2 1 ( Data Structure and Algorithm Analysis
2 e r c i v a l ' . # e r n a n d e 3
/hen the data is to be stored in the computer memor" in dispersed order is called non4linear data
structure. #or e$ample% trees% files% graphs etc.
#lassi$ication o$ %inear Data Structure
It can be classified into two t"pes.
2h"sical Data Structure
Logical Data Structure
)hysical Data Structure
/hen the data is to be stored in the computer memor" in proper order is called ph"sical data
structure.
E!ample* +
/hen we insert the data in one4dimensional arra"% then the data is stored in the memor" in that wa"%
as we insert the data in se5uence.
%ogical Data Structure
&he two4dimensional arra" is called logical data structure because we are not sure% that in which format
data in stored in the memor"% then we represent the data in the memor" at row ma6or order or column
ma6or order% so due to this reason it is called logical data structure.
,peration )er$orm on Data Structure
/hen data is proceeding then different t"pe of operation perform.
#ollowing are most important operation% which pla" ma6or role in data structure.
1) &raversing
) Searching
,) Sorting
7) Insertion
8) Deletion
9) +erging
:) *op"ing
Tra-ersing
'ccessing of records is called traversing. It is also 0nown as visiting of records.
Searching* +
#inding the location of record with given value is called Searching.
Sorting
&he arrangement of data in ascending or descending order is called sorting.
Insertion
'dding new record to structure is called inserting.
Deletions
)emoving a record or set of records form data structure is called deleting process
.erging
/hen two or more than two records are combined% this process is called merging.
#opying
&he creation of duplicate data item is called cop"ing process.
& I T ' 2 1 ( Data Structure and Algorithm Analysis
2 e r c i v a l ' . # e r n a n d e 3

You might also like