SlideShare a Scribd company logo
Definitions 
What is Data Structure? 
“It is set of procedures to define, store, access and 
manipulate data” 
or 
“The organized collection of data is called data structure” 
or 
“The logical or mathematical model of a particular 
organization of data is called data structure”
Types of Data Structure 
• Physical Data Structures 
– The data structures that have actually or physically 
same space in memory are called physical data 
structures 
– For example, one dimensional array 
• Logical Data Structures 
– The data structures which are treated, defined 
and stored in their logical picture 
– For example, Boolean data type
Types of Data 
• Primitive 
• Non-primitive 
• Records and Files 
• Primitive(Elementary Data Types) 
– The data types which are processed or 
manipulated as a single whole(i.e, alone) 
– Example, integer, real, charater etc. 
– They are also called built-in data types
Types of Data 
• Non-Primitive(Structure Data Types) 
– The items which are collection of other data 
structures are called non-primitive items. 
– If more than one values are combined in the 
single name is called non-primitive data structures 
– Example, Arrays, Stack, Queues etc. 
• Types of non-Primitive Data Structures 
– Linear 
– Non-Linear
Linear Data Structures 
The DS in which there is concept of linearity b/w the 
components is called linear data structure. The 
components exists in a certain sequence one after 
another. They have some successor or predecessor 
Example, Arrays, Stack, Queues etc.
Types of Linear Data Structures 
• Physical Linear Data Structures 
– The linear data structures whose successive 
components occupy consecutive memory 
locations are called physical linear DS. 
– Example, Array 
• Logical Linear Data Structures 
– The linear DS whose components are accessed 
in certain sequence but they are not necessarily 
stored in consecutive memory locations. 
– Example, Linked Lists 
Queues and Stacks are both logical and physical linear data 
structures
Non-Linear 
• The data structure in which the order of data structure 
does not matter and is not fixed 
– Example Tree, Graph 
• Record 
The collection of fields is called record. 
What is Domain? 
– Set of possible values of an item is called its domain 
– For example, set of possible values of Boolean type 
is 2
Arrays 
• A collection of consecutive locations having 
same type that can be accessed randomly. 
They are physical linear data structure 
• Types of Arrays 
– One Dimensional Array 
– Two Dimensional Array 
– Multidimensional Array
One Dimensional Arrays 
• 1-dimensional Arrays are also called vectors 
– Example, Int A[20]; 
– The elements of 1-d array are stored in consecutive 
memory locations 
– The start of array is called its base address 
– Let BA denotes the base address of the array and 
S denotes the size for each location, then the address 
of ith location can be accessed as: 
A(i)= BA + (i-1)* S 
Generally 
A(i)= BA + (i-lb)* S
2-d Array 
• Two dimensional array are used to store matrices 
• There are two methods for storing 2-d Arrays 
Row Major Order 
Column Major Order 
For Example int A[3][2]; 
Row Major Order 
1 2 3 4 5 6 
Column Major Order 
1 3 5 2 4 6
Row-Major and Column-Major Order 
• Consider 2-d array 
– int A[M][N]; 
– To reach an element in ith row and jth column will 
have to pass (i-1) rows and (j-1) columns. So address 
formula will be as: 
A(i,j)= BA+ [(i-1)*N + (j-1)]*S 
• In column Major Order 
A(i,j)= BA+ [(j-1)*M + (i-1)]*S 
– If lower and upper bounds are given then 
A(i,j)= BA+ [(i-L1)*(u2-L2+1) + (j-L2)]*S 
A(i,j)= BA+ [(j-L2)*(u1-L1+1) + (i-L1)]*S
3-d arrays 
• The storage for 3-d array has two types 
– Row- major order 
– Column – major order 
• In Row-Major order, first subscript varies more slowly 
than second which varies more slowly than 3rd element 
• In Column-Major order, 3rd subscript varies more 
slowly than 2nd which does more slowly than first one. 
– Example Int A[L][M][N] 
• Row-major order 
A(I,j,k)= BA+ [(i-1)*M*N +(j-1)*N+(k-1)]*S 
• Column-major order 
A(I,j,k)= BA+ [(k-1)L*M+(j-1)*M+(i]-1)]*S
N-Dimensional Array 
• Consider n-dimensional array variable as 
A[U1][U2]…….[Un] 
• Row-major order 
A(S1,S2,……Sn)= BA+ [(S1-1)U2*U3….Un+(S2-1)U3*U4….Un+(Sn- 
1 -1)Un+(Sn-1)]*S 
• Column-major order 
???

More Related Content

What's hot

Lecture 6 data structures and algorithms
Lecture 6 data structures and algorithmsLecture 6 data structures and algorithms
Lecture 6 data structures and algorithmsAakash deep Singhal
 
Sparse matrix and its representation data structure
Sparse matrix and its representation data structureSparse matrix and its representation data structure
Sparse matrix and its representation data structure
Vardhil Patel
 
Importance of Algorithm
Importance of AlgorithmImportance of Algorithm
Importance of Algorithm
Rakib Hossain
 
Sequential & binary, linear search
Sequential & binary, linear searchSequential & binary, linear search
Sequential & binary, linear search
montazur420
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayArray Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
Vignesh Saravanan
 
Introduction to Array ppt
Introduction to Array pptIntroduction to Array ppt
Introduction to Array ppt
sandhya yadav
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
KristinaBorooah
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsAakash deep Singhal
 
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHIBCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
Sowmya Jyothi
 
Matrices
MatricesMatrices
Matrices
Preeti Kashyap
 
Data Structures Chapter-4
Data Structures Chapter-4Data Structures Chapter-4
Data Structures Chapter-4
priyavanimurugarajan
 
Queues
QueuesQueues
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
Rabin BK
 
Multi catch statement
Multi catch statementMulti catch statement
Multi catch statementmyrajendra
 
Priority queue in DSA
Priority queue in DSAPriority queue in DSA
Priority queue in DSA
junnubabu
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using Stack
Soumen Santra
 
One dimensional 2
One dimensional 2One dimensional 2
One dimensional 2
Rajendran
 
Data structure stack&queue basics
Data structure stack&queue   basicsData structure stack&queue   basics
Data structure stack&queue basics
Selvin Josy Bai Somu
 

What's hot (20)

Lecture 6 data structures and algorithms
Lecture 6 data structures and algorithmsLecture 6 data structures and algorithms
Lecture 6 data structures and algorithms
 
Sparse matrix and its representation data structure
Sparse matrix and its representation data structureSparse matrix and its representation data structure
Sparse matrix and its representation data structure
 
Importance of Algorithm
Importance of AlgorithmImportance of Algorithm
Importance of Algorithm
 
Sequential & binary, linear search
Sequential & binary, linear searchSequential & binary, linear search
Sequential & binary, linear search
 
String, string builder, string buffer
String, string builder, string bufferString, string builder, string buffer
String, string builder, string buffer
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayArray Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional array
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
Introduction to Array ppt
Introduction to Array pptIntroduction to Array ppt
Introduction to Array ppt
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
 
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHIBCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
 
Matrices
MatricesMatrices
Matrices
 
Data Structures Chapter-4
Data Structures Chapter-4Data Structures Chapter-4
Data Structures Chapter-4
 
Queues
QueuesQueues
Queues
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
 
Multi catch statement
Multi catch statementMulti catch statement
Multi catch statement
 
Priority queue in DSA
Priority queue in DSAPriority queue in DSA
Priority queue in DSA
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using Stack
 
One dimensional 2
One dimensional 2One dimensional 2
One dimensional 2
 
Data structure stack&queue basics
Data structure stack&queue   basicsData structure stack&queue   basics
Data structure stack&queue basics
 

Viewers also liked

Data Representation
Data RepresentationData Representation
Data Representation
Education Front
 
Introduction To Stack
Introduction To StackIntroduction To Stack
Introduction To Stack
Education Front
 
Computer Evolution
Computer EvolutionComputer Evolution
Computer Evolution
Education Front
 
Improving Pronunciation
Improving PronunciationImproving Pronunciation
Improving Pronunciation
Education Front
 
Introduction to Algorithm
Introduction to AlgorithmIntroduction to Algorithm
Introduction to Algorithm
Education Front
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
Education Front
 
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
Shail Nakum
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
Education Front
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
Motaz Saad
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its typesNavtar Sidhu Brar
 
Data Representation
Data RepresentationData Representation
Data Representation
Education Front
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 

Viewers also liked (13)

Data Representation
Data RepresentationData Representation
Data Representation
 
Introduction To Stack
Introduction To StackIntroduction To Stack
Introduction To Stack
 
Computer Evolution
Computer EvolutionComputer Evolution
Computer Evolution
 
Improving Pronunciation
Improving PronunciationImproving Pronunciation
Improving Pronunciation
 
Introduction to Algorithm
Introduction to AlgorithmIntroduction to Algorithm
Introduction to Algorithm
 
Programming Language
Programming LanguageProgramming Language
Programming Language
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
 
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 

Similar to Introduction To Data Structures.

BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHIBCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
Sowmya Jyothi
 
DSA Unit II array.pptx
DSA Unit II array.pptxDSA Unit II array.pptx
DSA Unit II array.pptx
sayalishivarkar1
 
Unit 1.ppt
Unit 1.pptUnit 1.ppt
Unit 1.ppt
Minakshee Patil
 
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyDatastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyMalikireddy Bramhananda Reddy
 
Data structures - unit 1
Data structures - unit 1Data structures - unit 1
Data structures - unit 1
SaranyaP45
 
data structure unit -1_170434dd7400.pptx
data structure unit -1_170434dd7400.pptxdata structure unit -1_170434dd7400.pptx
data structure unit -1_170434dd7400.pptx
coc7987515756
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
ColorfullMedia
 
Data struchers and algorithms
Data struchers and algorithmsData struchers and algorithms
Data struchers and algorithms
junnubabu
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
ssuser031f35
 
C++ Data Structure PPT.ppt
C++ Data Structure PPT.pptC++ Data Structure PPT.ppt
C++ Data Structure PPT.ppt
Mukesh Thakur
 
cluod.pdf
cluod.pdfcluod.pdf
cluod.pdf
ssuser92d367
 
C++ Data Structure PPT.pptx
C++ Data Structure PPT.pptxC++ Data Structure PPT.pptx
C++ Data Structure PPT.pptx
Mukesh Thakur
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
sarala9
 
unit 1_Linked list.pptx
unit 1_Linked list.pptxunit 1_Linked list.pptx
unit 1_Linked list.pptx
ssuser7922b8
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
SaralaT3
 
unit 1.pptx
unit 1.pptxunit 1.pptx
unit 1.pptx
ssuser7922b8
 
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
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structures
Senthil Murugan
 
DATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGESTDATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGEST
Swapnil Mishra
 

Similar to Introduction To Data Structures. (20)

BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHIBCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
 
DSA Unit II array.pptx
DSA Unit II array.pptxDSA Unit II array.pptx
DSA Unit II array.pptx
 
Unit 1.ppt
Unit 1.pptUnit 1.ppt
Unit 1.ppt
 
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyDatastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
 
Data structures - unit 1
Data structures - unit 1Data structures - unit 1
Data structures - unit 1
 
data structure unit -1_170434dd7400.pptx
data structure unit -1_170434dd7400.pptxdata structure unit -1_170434dd7400.pptx
data structure unit -1_170434dd7400.pptx
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
 
M v bramhananda reddy dsa complete notes
M v bramhananda reddy dsa complete notesM v bramhananda reddy dsa complete notes
M v bramhananda reddy dsa complete notes
 
Data struchers and algorithms
Data struchers and algorithmsData struchers and algorithms
Data struchers and algorithms
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
C++ Data Structure PPT.ppt
C++ Data Structure PPT.pptC++ Data Structure PPT.ppt
C++ Data Structure PPT.ppt
 
cluod.pdf
cluod.pdfcluod.pdf
cluod.pdf
 
C++ Data Structure PPT.pptx
C++ Data Structure PPT.pptxC++ Data Structure PPT.pptx
C++ Data Structure PPT.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
unit 1_Linked list.pptx
unit 1_Linked list.pptxunit 1_Linked list.pptx
unit 1_Linked list.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
unit 1.pptx
unit 1.pptxunit 1.pptx
unit 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
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structures
 
DATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGESTDATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGEST
 

More from Education Front

Generic Software Process Models
Generic Software Process ModelsGeneric Software Process Models
Generic Software Process ModelsEducation Front
 
Problem Sloving
Problem SlovingProblem Sloving
Problem Sloving
Education Front
 
Problem Solving - 1
Problem Solving - 1Problem Solving - 1
Problem Solving - 1
Education Front
 
Process Models
Process ModelsProcess Models
Process Models
Education Front
 
Process Models
Process ModelsProcess Models
Process Models
Education Front
 
Revised Process of Communication
Revised Process of CommunicationRevised Process of Communication
Revised Process of Communication
Education Front
 
Importance of Language in Communication
Importance of Language in CommunicationImportance of Language in Communication
Importance of Language in Communication
Education Front
 
Lecture1 (SE Introduction)
Lecture1 (SE Introduction)Lecture1 (SE Introduction)
Lecture1 (SE Introduction)
Education Front
 
Lecture 2 (Software Processes)
Lecture 2 (Software Processes)Lecture 2 (Software Processes)
Lecture 2 (Software Processes)
Education Front
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureEducation Front
 
Facing Today’s Communication Challenges
Facing Today’s Communication ChallengesFacing Today’s Communication Challenges
Facing Today’s Communication Challenges
Education Front
 
Introduction To EMU
Introduction To EMUIntroduction To EMU
Introduction To EMU
Education Front
 
Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.
Education Front
 
Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skillsEducation Front
 
Introduction to Presentation Skills
Introduction to Presentation SkillsIntroduction to Presentation Skills
Introduction to Presentation Skills
Education Front
 
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Education Front
 
Multiple Drug Resistance and Antibiotic Misuse In English.
Multiple Drug Resistance and Antibiotic Misuse In English.Multiple Drug Resistance and Antibiotic Misuse In English.
Multiple Drug Resistance and Antibiotic Misuse In English.
Education Front
 

More from Education Front (17)

Generic Software Process Models
Generic Software Process ModelsGeneric Software Process Models
Generic Software Process Models
 
Problem Sloving
Problem SlovingProblem Sloving
Problem Sloving
 
Problem Solving - 1
Problem Solving - 1Problem Solving - 1
Problem Solving - 1
 
Process Models
Process ModelsProcess Models
Process Models
 
Process Models
Process ModelsProcess Models
Process Models
 
Revised Process of Communication
Revised Process of CommunicationRevised Process of Communication
Revised Process of Communication
 
Importance of Language in Communication
Importance of Language in CommunicationImportance of Language in Communication
Importance of Language in Communication
 
Lecture1 (SE Introduction)
Lecture1 (SE Introduction)Lecture1 (SE Introduction)
Lecture1 (SE Introduction)
 
Lecture 2 (Software Processes)
Lecture 2 (Software Processes)Lecture 2 (Software Processes)
Lecture 2 (Software Processes)
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Facing Today’s Communication Challenges
Facing Today’s Communication ChallengesFacing Today’s Communication Challenges
Facing Today’s Communication Challenges
 
Introduction To EMU
Introduction To EMUIntroduction To EMU
Introduction To EMU
 
Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.
 
Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skills
 
Introduction to Presentation Skills
Introduction to Presentation SkillsIntroduction to Presentation Skills
Introduction to Presentation Skills
 
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
 
Multiple Drug Resistance and Antibiotic Misuse In English.
Multiple Drug Resistance and Antibiotic Misuse In English.Multiple Drug Resistance and Antibiotic Misuse In English.
Multiple Drug Resistance and Antibiotic Misuse In English.
 

Recently uploaded

The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 

Recently uploaded (20)

The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 

Introduction To Data Structures.

  • 1. Definitions What is Data Structure? “It is set of procedures to define, store, access and manipulate data” or “The organized collection of data is called data structure” or “The logical or mathematical model of a particular organization of data is called data structure”
  • 2. Types of Data Structure • Physical Data Structures – The data structures that have actually or physically same space in memory are called physical data structures – For example, one dimensional array • Logical Data Structures – The data structures which are treated, defined and stored in their logical picture – For example, Boolean data type
  • 3. Types of Data • Primitive • Non-primitive • Records and Files • Primitive(Elementary Data Types) – The data types which are processed or manipulated as a single whole(i.e, alone) – Example, integer, real, charater etc. – They are also called built-in data types
  • 4. Types of Data • Non-Primitive(Structure Data Types) – The items which are collection of other data structures are called non-primitive items. – If more than one values are combined in the single name is called non-primitive data structures – Example, Arrays, Stack, Queues etc. • Types of non-Primitive Data Structures – Linear – Non-Linear
  • 5. Linear Data Structures The DS in which there is concept of linearity b/w the components is called linear data structure. The components exists in a certain sequence one after another. They have some successor or predecessor Example, Arrays, Stack, Queues etc.
  • 6. Types of Linear Data Structures • Physical Linear Data Structures – The linear data structures whose successive components occupy consecutive memory locations are called physical linear DS. – Example, Array • Logical Linear Data Structures – The linear DS whose components are accessed in certain sequence but they are not necessarily stored in consecutive memory locations. – Example, Linked Lists Queues and Stacks are both logical and physical linear data structures
  • 7. Non-Linear • The data structure in which the order of data structure does not matter and is not fixed – Example Tree, Graph • Record The collection of fields is called record. What is Domain? – Set of possible values of an item is called its domain – For example, set of possible values of Boolean type is 2
  • 8. Arrays • A collection of consecutive locations having same type that can be accessed randomly. They are physical linear data structure • Types of Arrays – One Dimensional Array – Two Dimensional Array – Multidimensional Array
  • 9. One Dimensional Arrays • 1-dimensional Arrays are also called vectors – Example, Int A[20]; – The elements of 1-d array are stored in consecutive memory locations – The start of array is called its base address – Let BA denotes the base address of the array and S denotes the size for each location, then the address of ith location can be accessed as: A(i)= BA + (i-1)* S Generally A(i)= BA + (i-lb)* S
  • 10. 2-d Array • Two dimensional array are used to store matrices • There are two methods for storing 2-d Arrays Row Major Order Column Major Order For Example int A[3][2]; Row Major Order 1 2 3 4 5 6 Column Major Order 1 3 5 2 4 6
  • 11. Row-Major and Column-Major Order • Consider 2-d array – int A[M][N]; – To reach an element in ith row and jth column will have to pass (i-1) rows and (j-1) columns. So address formula will be as: A(i,j)= BA+ [(i-1)*N + (j-1)]*S • In column Major Order A(i,j)= BA+ [(j-1)*M + (i-1)]*S – If lower and upper bounds are given then A(i,j)= BA+ [(i-L1)*(u2-L2+1) + (j-L2)]*S A(i,j)= BA+ [(j-L2)*(u1-L1+1) + (i-L1)]*S
  • 12. 3-d arrays • The storage for 3-d array has two types – Row- major order – Column – major order • In Row-Major order, first subscript varies more slowly than second which varies more slowly than 3rd element • In Column-Major order, 3rd subscript varies more slowly than 2nd which does more slowly than first one. – Example Int A[L][M][N] • Row-major order A(I,j,k)= BA+ [(i-1)*M*N +(j-1)*N+(k-1)]*S • Column-major order A(I,j,k)= BA+ [(k-1)L*M+(j-1)*M+(i]-1)]*S
  • 13. N-Dimensional Array • Consider n-dimensional array variable as A[U1][U2]…….[Un] • Row-major order A(S1,S2,……Sn)= BA+ [(S1-1)U2*U3….Un+(S2-1)U3*U4….Un+(Sn- 1 -1)Un+(Sn-1)]*S • Column-major order ???