SlideShare a Scribd company logo
Chapter 1
Data Structure
Data Structure :
The logical or mathematical model of a particular organization of data is called a data
structure.
Data Structure
Primitive Non-Primitive
Linear(Sequential) NonLinear(Random)
Array Tree
Stack Binary
Queue Binary
Linked List Search
Searching Graph
Insertion
Deletion
Update
Sorting
Data Structure are divided into two types :
1. Linear Data Structure
2. Non Linear Data Structure
1. Linear Data Structure :
The data structure in which elements are store or processed in sequential manner
is called linear data structure.
Data structure are divided in follows.
a. Linear Array:
It stores information in sequential order and allows to access it in random
order.
b. Linked List :
In which node is divided in two part. First is INFO part and second is
LINK part. INFO contains information about the given node and LINK
part contains address of the next element in the list.
Example:
START INFO LINK
1 2 3 4
FIG : Linked List.
START
INFO LINK
1 A
2
3
4
FIG: Memory representation of linked list.
c. Stack:
1 A 2 B 3 C 4 D X
1
A
D
B
C
3
0
4
2
A stack is also called as Last In First Out [LIFO] system.
Stack is a data structure in which element are inserted and deleted at only
one end is called Top at the stack.
Example:
3
2
TOP= 3 1 1
FIG : Stack
1 2 3 4 5 6 7 8 9
TOP=3 MAXSTK =9
FIG : Memory representation of Stack.
d. Queue:
A queue also called a First In First Out [FIFO] system.
Queue is a linear list element in which insertion can take place only at one
end is “REAR” and dilatation can take place only at one end is “FRONT”.
Example :
Queue
1 2 3 4 5 6
FRONT =1 N=6
REAR =5
FIG : Queue
C
B
A
A B C
A B C D E
2. Non Linear Data Structure:
If there is a indirect relation between the different data item of an data structure
then it is called as Non Linear data structure.
There are two types
a. Tree:
The hierarchical representation of data is handle by using a data structure
is called as Tree. On which data is represent indifferent levels.
The first level of a tree is called as the root of the tree and if having the
left and right sub trees.
FIG : Tree
b. Graph:
The pictorial representation of information is called as graph. By using
graph we are able to representation the large amount of information in
small space the advantage of graph is that easy to understand.
Aurangabad
Nanded Pune
Mumbai
FIG : Graph
Root +
Left Right A B
a b c d a b dc
 Data Structure Operation:
Data Structure :
The logical or mathematical model of a particular organization of data is called a data
structure.
Data Structure Operation:
The data appearing in our data structures are processed by means of certain operations.
The particular data structure that one choose for a given situation depends largely on the
frequency with which specific operations are performed.
The following operations.
1. Traversing
2. Searching
3. Insertion
4. Deletion
5. Sorting
6. Merging
1. Traversing :
Visiting each and every element of data structure that operation is called
traversing.
2. Searching :
Finding the location of data item by using the given key value is called as
searching operation.
3. Insertion :
Insert the new data item in the existing data structure the operation is called as
insertion operation.
4. Deletion :
Removing and item from the data structure is called as deletion operation.
5. Sorting :
Arrange the data in same logical order it may be either ascending or descending
that operation is called as sorting operation.
Ex. NAME key, NUMBER key.
6. Merging :
Combine the records of two sorted files in a single file and the resultant file is
also a sorted file then that operation is called as merging.
Ex. Copying and concatenation.
 Complexity of algorithm :
Data Structure :
The logical or mathematical model of a particular organization of data is called a data
structure.
Complexity of algorithm :
The complexity is nothing but a quality of measurement factor of an algorithm. It is a
function which text algorithm as an inputs and return the required space and execution time
of that algorithm.
The time and space these are two basic things related to represent the quality of
algorithm.
Consider R is algorithm and N is the size of the input data. The time and space use to
by the algorithm are the two main measure for the efficiency of the algorithm.
The time is measured by counting the number of operation is sorting and searching
algorithm.
Ex. The number of comprisen the space is measured by counting the maximum of
memory needed by the algorithm.
 Time Space Trade off Complexity :
The space time trade off refers to a choice between algorithmic solution of data
processing problem that allow one to decrease the running time of an algorithmic solution
by increasing the space to store the data and vice-versa.
There are divided into three case
1. Average Case
2. Best Case
3. Worst Case
1. Average Case :
Average case is number of comprisen are required to execute the given
algorithm.
Therefore Cn=n/2.
2. Best Case :
Small number of comprisen are required to execute the given algorithm.
3. Worst Case :
Maximum number of comprisen are required.
Therefore Cn=n.
 Elementary Data Organization :
Data Structure :
The logical or mathematical model of a particular organization of data is called a data
structure.
Elementary Data Organization :
Data are simply values or set of values. A data item refers to a single unit of values.
Data items that are divided into sub items are called group items those that are not are called
elementary items.
Example :
Student NAME may be divided into three sub items – first NAME, middle
NAME and last NAME but the social security number would normally treated as a single
item.
Collection of data are frequently organized into a hierarchy of fields records and files.
In order to make these term move precise we introduction some additional terminology.
An entity is some thing that has certain attributes or properties which may be
assigned values. The values them selves may be either number or non- numeric.
Ex. Possible attributes and their corresponding values for on entity an student of a
given organization.
Attributes : NAME AGE ROLL_NO CLASS
Values : Raj 21 4 BSC I
OR
 Elementary Data Organization :
Data Structure :
The logical or mathematical model of a particular organization of data is called a data
structure.
Elementary Data Organization :
Data Structure are simply values or set of values data item refers to single elementary
unit which represent our data. Data items are of two types as
1. Elementary Data Item
2. Group Data Item
The data item which consist of single values is refers as elementary data item and
the data item which consist of subparts it refers as group data item the following
example.
Ex. Possible attributes and their corresponding values for on entity an student of a given
organization.
Attributes : NAME AGE ROLL_NO CLASS
Values : Raj 21 4 BSC I
Here , in the example NAME ,AGE and ROLL_NO are the elementary data item
where as CLASS is a group data item.
Questions :
1. What is Data structure? Explain in detail.
2. What is elementary DS?
3. What is complexity of algorithm?
4. What is linear data structure? Explain in detail.
5. What is DS? Explain Operation of DS.
6. Short note
a. Group items.
b. Entity of elementary data structure .
c. Time space trade off complexity.

More Related Content

What's hot

Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Data structures
Data structuresData structures
Data structures
MADHAVASAIYENDUVA
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
Aakash deep Singhal
 
Linked List
Linked ListLinked List
Linked List
BHARATH KUMAR
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Shaista Qadir
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
Jazz Jinia Bhowmik
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
sunilchute1
 
Ch1
Ch1Ch1
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
Adams Sidibe
 
Data structure
Data structureData structure
Data structure
Mohd Arif
 
Sql ppt
Sql pptSql ppt
Data resource management and DSS
Data resource management and DSSData resource management and DSS
Data resource management and DSS
RajThakuri
 
104333 sri vidhya eng notes
104333 sri vidhya eng notes104333 sri vidhya eng notes
104333 sri vidhya eng notes
Krishnakumar Btech
 
Data structure
Data structureData structure
Data structure
Prof. Dr. K. Adisesha
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
oudesign
 
Data structures introduction
Data structures   introductionData structures   introduction
Data structures introduction
maamir farooq
 
Description of data
Description of dataDescription of data
Description of data
Johnna Mae Yodico
 
DSA chapter 1
DSA chapter 1DSA chapter 1
DSA chapter 1
Er. Ganesh Ram Suwal
 
Data structures and Alogarithims
Data structures and AlogarithimsData structures and Alogarithims
Data structures and Alogarithims
Victor Palmar
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structure
Rai University
 

What's hot (20)

Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 
Data structures
Data structuresData structures
Data structures
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
 
Linked List
Linked ListLinked List
Linked List
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Ch1
Ch1Ch1
Ch1
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
Data structure
Data structureData structure
Data structure
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
Data resource management and DSS
Data resource management and DSSData resource management and DSS
Data resource management and DSS
 
104333 sri vidhya eng notes
104333 sri vidhya eng notes104333 sri vidhya eng notes
104333 sri vidhya eng notes
 
Data structure
Data structureData structure
Data structure
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
 
Data structures introduction
Data structures   introductionData structures   introduction
Data structures introduction
 
Description of data
Description of dataDescription of data
Description of data
 
DSA chapter 1
DSA chapter 1DSA chapter 1
DSA chapter 1
 
Data structures and Alogarithims
Data structures and AlogarithimsData structures and Alogarithims
Data structures and Alogarithims
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structure
 

Similar to Chapter 1

Datastructures Notes
Datastructures NotesDatastructures Notes
Datastructures Notes
Ranjithkumar C
 
1- Introduction.pptx.pdf
1- Introduction.pptx.pdf1- Introduction.pptx.pdf
1- Introduction.pptx.pdf
gm6523
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
thamizh arasi
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
sarala9
 
Data Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxData Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptx
mexiuro901
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf
SulabhPawaia
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
SaralaT3
 
UNIT II.docx
UNIT II.docxUNIT II.docx
UNIT II.docx
Revathiparamanathan
 
Lect 1-2 Zaheer Abbas
Lect 1-2 Zaheer AbbasLect 1-2 Zaheer Abbas
Lect 1-2 Zaheer Abbas
Information Technology Center
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
NalinNishant3
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfChapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Axmedcarb
 
Introduction to Data Structure.pptx
Introduction to Data Structure.pptxIntroduction to Data Structure.pptx
Introduction to Data Structure.pptx
GlenardDSarmiento
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
BishalChowdhury10
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introduction
Sugandh Wafai
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
adeel hamid
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresres
amplopsurat
 
Data Structures & Algorithms
Data Structures & AlgorithmsData Structures & Algorithms
Data Structures & Algorithms
Ain-ul-Moiz Khawaja
 
Bc0041
Bc0041Bc0041
Bc0041
hayerpa
 
UNITIII LDS.pdf
UNITIII LDS.pdfUNITIII LDS.pdf
UNITIII LDS.pdf
meenamadhuvandhi2
 
Data structure (basics)
Data structure (basics)Data structure (basics)
Data structure (basics)
ShrushtiGole
 

Similar to Chapter 1 (20)

Datastructures Notes
Datastructures NotesDatastructures Notes
Datastructures Notes
 
1- Introduction.pptx.pdf
1- Introduction.pptx.pdf1- Introduction.pptx.pdf
1- Introduction.pptx.pdf
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
Data Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxData Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptx
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
UNIT II.docx
UNIT II.docxUNIT II.docx
UNIT II.docx
 
Lect 1-2 Zaheer Abbas
Lect 1-2 Zaheer AbbasLect 1-2 Zaheer Abbas
Lect 1-2 Zaheer Abbas
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfChapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdf
 
Introduction to Data Structure.pptx
Introduction to Data Structure.pptxIntroduction to Data Structure.pptx
Introduction to Data Structure.pptx
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introduction
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresres
 
Data Structures & Algorithms
Data Structures & AlgorithmsData Structures & Algorithms
Data Structures & Algorithms
 
Bc0041
Bc0041Bc0041
Bc0041
 
UNITIII LDS.pdf
UNITIII LDS.pdfUNITIII LDS.pdf
UNITIII LDS.pdf
 
Data structure (basics)
Data structure (basics)Data structure (basics)
Data structure (basics)
 

Recently uploaded

Anti-Universe And Emergent Gravity and the Dark Universe
Anti-Universe And Emergent Gravity and the Dark UniverseAnti-Universe And Emergent Gravity and the Dark Universe
Anti-Universe And Emergent Gravity and the Dark Universe
Sérgio Sacani
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
Leonel Morgado
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
Scintica Instrumentation
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
Sérgio Sacani
 
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
PsychoTech Services
 
HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1
Shashank Shekhar Pandey
 
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Sérgio Sacani
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
PirithiRaju
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
Carl Bergstrom
 
cathode ray oscilloscope and its applications
cathode ray oscilloscope and its applicationscathode ray oscilloscope and its applications
cathode ray oscilloscope and its applications
sandertein
 
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
ABHISHEK SONI NIMT INSTITUTE OF MEDICAL AND PARAMEDCIAL SCIENCES , GOVT PG COLLEGE NOIDA
 
fermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptxfermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptx
ananya23nair
 
JAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDS
JAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDSJAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDS
JAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDS
Sérgio Sacani
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills MN
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
frank0071
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
Frédéric Baudron
 
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdfAJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR
 
Tissue fluids_etiology_volume regulation_pressure.pptx
Tissue fluids_etiology_volume regulation_pressure.pptxTissue fluids_etiology_volume regulation_pressure.pptx
Tissue fluids_etiology_volume regulation_pressure.pptx
muralinath2
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
by6843629
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
University of Hertfordshire
 

Recently uploaded (20)

Anti-Universe And Emergent Gravity and the Dark Universe
Anti-Universe And Emergent Gravity and the Dark UniverseAnti-Universe And Emergent Gravity and the Dark Universe
Anti-Universe And Emergent Gravity and the Dark Universe
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
 
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
 
HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1
 
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
Candidate young stellar objects in the S-cluster: Kinematic analysis of a sub...
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
 
cathode ray oscilloscope and its applications
cathode ray oscilloscope and its applicationscathode ray oscilloscope and its applications
cathode ray oscilloscope and its applications
 
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
MICROBIAL INTERACTION PPT/ MICROBIAL INTERACTION AND THEIR TYPES // PLANT MIC...
 
fermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptxfermented food science of sauerkraut.pptx
fermented food science of sauerkraut.pptx
 
JAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDS
JAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDSJAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDS
JAMES WEBB STUDY THE MASSIVE BLACK HOLE SEEDS
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
 
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdfAJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdf
 
Tissue fluids_etiology_volume regulation_pressure.pptx
Tissue fluids_etiology_volume regulation_pressure.pptxTissue fluids_etiology_volume regulation_pressure.pptx
Tissue fluids_etiology_volume regulation_pressure.pptx
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
 

Chapter 1

  • 1. Chapter 1 Data Structure Data Structure : The logical or mathematical model of a particular organization of data is called a data structure. Data Structure Primitive Non-Primitive Linear(Sequential) NonLinear(Random) Array Tree Stack Binary Queue Binary Linked List Search Searching Graph Insertion Deletion Update Sorting
  • 2. Data Structure are divided into two types : 1. Linear Data Structure 2. Non Linear Data Structure 1. Linear Data Structure : The data structure in which elements are store or processed in sequential manner is called linear data structure. Data structure are divided in follows. a. Linear Array: It stores information in sequential order and allows to access it in random order. b. Linked List : In which node is divided in two part. First is INFO part and second is LINK part. INFO contains information about the given node and LINK part contains address of the next element in the list. Example: START INFO LINK 1 2 3 4 FIG : Linked List. START INFO LINK 1 A 2 3 4 FIG: Memory representation of linked list. c. Stack: 1 A 2 B 3 C 4 D X 1 A D B C 3 0 4 2
  • 3. A stack is also called as Last In First Out [LIFO] system. Stack is a data structure in which element are inserted and deleted at only one end is called Top at the stack. Example: 3 2 TOP= 3 1 1 FIG : Stack 1 2 3 4 5 6 7 8 9 TOP=3 MAXSTK =9 FIG : Memory representation of Stack. d. Queue: A queue also called a First In First Out [FIFO] system. Queue is a linear list element in which insertion can take place only at one end is “REAR” and dilatation can take place only at one end is “FRONT”. Example : Queue 1 2 3 4 5 6 FRONT =1 N=6 REAR =5 FIG : Queue C B A A B C A B C D E
  • 4. 2. Non Linear Data Structure: If there is a indirect relation between the different data item of an data structure then it is called as Non Linear data structure. There are two types a. Tree: The hierarchical representation of data is handle by using a data structure is called as Tree. On which data is represent indifferent levels. The first level of a tree is called as the root of the tree and if having the left and right sub trees. FIG : Tree b. Graph: The pictorial representation of information is called as graph. By using graph we are able to representation the large amount of information in small space the advantage of graph is that easy to understand. Aurangabad Nanded Pune Mumbai FIG : Graph Root + Left Right A B a b c d a b dc
  • 5.  Data Structure Operation: Data Structure : The logical or mathematical model of a particular organization of data is called a data structure. Data Structure Operation: The data appearing in our data structures are processed by means of certain operations. The particular data structure that one choose for a given situation depends largely on the frequency with which specific operations are performed. The following operations. 1. Traversing 2. Searching 3. Insertion 4. Deletion 5. Sorting 6. Merging 1. Traversing : Visiting each and every element of data structure that operation is called traversing. 2. Searching : Finding the location of data item by using the given key value is called as searching operation. 3. Insertion : Insert the new data item in the existing data structure the operation is called as insertion operation. 4. Deletion : Removing and item from the data structure is called as deletion operation. 5. Sorting : Arrange the data in same logical order it may be either ascending or descending that operation is called as sorting operation. Ex. NAME key, NUMBER key.
  • 6. 6. Merging : Combine the records of two sorted files in a single file and the resultant file is also a sorted file then that operation is called as merging. Ex. Copying and concatenation.  Complexity of algorithm : Data Structure : The logical or mathematical model of a particular organization of data is called a data structure. Complexity of algorithm : The complexity is nothing but a quality of measurement factor of an algorithm. It is a function which text algorithm as an inputs and return the required space and execution time of that algorithm. The time and space these are two basic things related to represent the quality of algorithm. Consider R is algorithm and N is the size of the input data. The time and space use to by the algorithm are the two main measure for the efficiency of the algorithm. The time is measured by counting the number of operation is sorting and searching algorithm. Ex. The number of comprisen the space is measured by counting the maximum of memory needed by the algorithm.  Time Space Trade off Complexity : The space time trade off refers to a choice between algorithmic solution of data processing problem that allow one to decrease the running time of an algorithmic solution by increasing the space to store the data and vice-versa. There are divided into three case 1. Average Case 2. Best Case 3. Worst Case 1. Average Case :
  • 7. Average case is number of comprisen are required to execute the given algorithm. Therefore Cn=n/2. 2. Best Case : Small number of comprisen are required to execute the given algorithm. 3. Worst Case : Maximum number of comprisen are required. Therefore Cn=n.  Elementary Data Organization : Data Structure : The logical or mathematical model of a particular organization of data is called a data structure. Elementary Data Organization : Data are simply values or set of values. A data item refers to a single unit of values. Data items that are divided into sub items are called group items those that are not are called elementary items. Example : Student NAME may be divided into three sub items – first NAME, middle NAME and last NAME but the social security number would normally treated as a single item. Collection of data are frequently organized into a hierarchy of fields records and files. In order to make these term move precise we introduction some additional terminology. An entity is some thing that has certain attributes or properties which may be assigned values. The values them selves may be either number or non- numeric. Ex. Possible attributes and their corresponding values for on entity an student of a given organization. Attributes : NAME AGE ROLL_NO CLASS Values : Raj 21 4 BSC I
  • 8. OR  Elementary Data Organization : Data Structure : The logical or mathematical model of a particular organization of data is called a data structure. Elementary Data Organization : Data Structure are simply values or set of values data item refers to single elementary unit which represent our data. Data items are of two types as 1. Elementary Data Item 2. Group Data Item The data item which consist of single values is refers as elementary data item and the data item which consist of subparts it refers as group data item the following example. Ex. Possible attributes and their corresponding values for on entity an student of a given organization. Attributes : NAME AGE ROLL_NO CLASS Values : Raj 21 4 BSC I Here , in the example NAME ,AGE and ROLL_NO are the elementary data item where as CLASS is a group data item.
  • 9. Questions : 1. What is Data structure? Explain in detail. 2. What is elementary DS? 3. What is complexity of algorithm? 4. What is linear data structure? Explain in detail. 5. What is DS? Explain Operation of DS. 6. Short note a. Group items. b. Entity of elementary data structure . c. Time space trade off complexity.