SlideShare a Scribd company logo
1 of 20
Introduction to Data Structure
Dr. Vimmi Pandey 1
Basic Terminologies
● Data Structure
– Data: are simply a value are set of values
of different type which is called data types
like string, integer, char etc.
– Structure: Way of organizing information, so
that it is easier to use
– In simple words we can define data structures as
● Its a way organizingdata in such a way so
that data can be easier to use.
2
Basic Terminologies
● Data Structure ..
– A data structure is a particular way of
organizing data in a computer so that it
can be used efifciently.
– A scheme for organizing related pieces of
information.
3
Why Data Structure
●
●
●
Human requirement with computer are going to
complex day by day. To solve the complex
requirements in efficient way we need this
study.
Provide fastest solution of human requirements.
Provide efficient solution of complex problem.
– Space
– Time
4
Study in Data Structure
● Logical or mathematical description of the
●
structure.
Implementation of structure on a computer
●
using different computer languages ( C, C++,
JAVA, pl-languages etc.)
Qunatitative analysis of the structure, which
includes determining the amount of memory
needed to store the structure and the time
required to process the structure.
5
Classification of Data Structure
Data Structure
Primitive Data
Structure
Non primitive Data
Structure
Linear Data Structure Non-Linear Data Structure
Array Linked List Stack Queue Tree Graph Files
Integer Float Character Pointer
zaid shabbir
6
Classification of Data Structure ...
● Simple Data Structure: Simple data structure can be
constructed with the help of primitive data structure. A
primitive data structure used to represent the standard data
types of any one of the computer languages (integer, Character,
float etc.).
● Compound Data Structure: Compound data structure
can be constructed with the help of any one of the primitive data
structure and it is having a specific functionality. It can be
designed by user. It can be classified as Linear and Non-Linear
Data Structure.
.
7
Classification of Data Structure ...
● Linear Data Structures: A linear data structure traverses
the data elements sequentially, in which only one data element
can directly be reached. Ex: Arrays, Linked Lists
● Non-Linear Data Structures: Every data item is
attached to several other data items in a way that is specific for
reflecting relationships. The data items are not arranged in a
sequential structure. Ex: Trees, Graphs
8
Operation on Linear/Non-Linear
Data Structure
●
●
●
●
●
Add an element
Delete an element
Traverse / Display
Sort the list of elements
Search for a data element
9
Types of Data Structure
● Array: is commonly used in computer
programming to mean a contiguous block of
memory locations, where each memory location
stores one fixed-length data item. e.g. Array of
Integers int a[10], Array of Character char b[10]
Array of Integers
0 1 2 3 4 5 6 7 8 9
5 6 4 3 7 8 9 2 1 2
Array of Character
0 1 2 3 4 5 6 7 8 9
5 6 4 3 7 8 9 2 1 2
10
Types of Data Structure ...
Stack: A stack is a data
structure in which items can
be inserted only from one
end and get items back from
the same end. There , the last
item inserted into stack, is
the the first item to be taken
out from the stack. In short
its also called Last in First
out [LIFO]. 11
Types of Data Structure ...
ended data structure
which items can
Queue: A queue is two
in
be
inserted from one end and
taken out from the other
end. Therefore , the first
item inserted into queue is
the first item to be taken
out from the queue. This
property is called First in
First out [FIFO]. 12
Types of Data Structure ...
Linked List: Could alternately used to store items. In
linked list space to store items is created as is needed
and destroyed when space no longer required to store
items. Hence linked list is a dynamic data structure
space acquire only when need.
13
Types of Data Structure ...
Tree: is a non-linear data
structure which is
mainly used to represent
data containing a
hierarchical relationship
between elements.
Binary Tree: A binary
tree is a tree such that
every node has at most 2
child and each node is
labeled as either left of
right child.
14
Types of Data Structure ...
15
Types of Data Structure ...
Graph: It is a set of items connected by edges.
Each item is called a vertex or node. Trees are
just like a special kinds of graphs. Graphs are
usually represented by G = (V, E), where V is the
set vertices and E is the set of Edges.
16
Types of Data Structure ...
Undirected Graph: A graph
whose edges are
unordered pair of vertices.
That is each edge connects
two vertices. In an
undirected graph, direction
is not important, if the path
is available, it can be
traversed in any direction.
17
Types of Data Structure ...
Directed Graph: In directed graph a directional
edge connect two node/vertex. If there is one edge
from one vertex to other then only this path can be
followed.
18
Types of Data Structure ...
Weighted Graph: A graph having a weight, ornumber
associated with each edge
19
Selecting a Data Structure
●
●
●
Analyze the problem to determine the resource
constraints a solution must meet.
Determine the basic operations that must be
supported. Quantify the resource constraints
for each operation.
Select the data structure that best meets these
requirements.
20

More Related Content

Similar to Classification of DS.pptx

Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresresamplopsurat
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxajajkhan16
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureadeel hamid
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxDCABCA
 
SIX WEEKS SUMMER TRAINING REPORT.pptx
SIX WEEKS SUMMER TRAINING REPORT.pptxSIX WEEKS SUMMER TRAINING REPORT.pptx
SIX WEEKS SUMMER TRAINING REPORT.pptxsagabo1
 
Data structure power point presentation
Data structure power point presentation Data structure power point presentation
Data structure power point presentation Anil Kumar Prajapati
 
Chapter 1 - Introduction to Data Structure.ppt
Chapter 1 - Introduction to Data Structure.pptChapter 1 - Introduction to Data Structure.ppt
Chapter 1 - Introduction to Data Structure.pptNORSHADILAAHMADBADEL
 
Unit 1 Data Structures Introduction L1.pptx
Unit 1 Data Structures Introduction L1.pptxUnit 1 Data Structures Introduction L1.pptx
Unit 1 Data Structures Introduction L1.pptxdummysharma1
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data StructuresAmar Jukuntla
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdfSulabhPawaia
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structurechouguleamruta24
 
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.pptxmexiuro901
 
Summer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & AlgorithmsSummer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & AlgorithmsKAUSHAL KUMAR JHA
 

Similar to Classification of DS.pptx (20)

Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresres
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptx
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
SIX WEEKS SUMMER TRAINING REPORT.pptx
SIX WEEKS SUMMER TRAINING REPORT.pptxSIX WEEKS SUMMER TRAINING REPORT.pptx
SIX WEEKS SUMMER TRAINING REPORT.pptx
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
 
Data structure power point presentation
Data structure power point presentation Data structure power point presentation
Data structure power point presentation
 
Datastructures Notes
Datastructures NotesDatastructures Notes
Datastructures Notes
 
Chapter 1 - Introduction to Data Structure.ppt
Chapter 1 - Introduction to Data Structure.pptChapter 1 - Introduction to Data Structure.ppt
Chapter 1 - Introduction to Data Structure.ppt
 
Unit 1 Data Structures Introduction L1.pptx
Unit 1 Data Structures Introduction L1.pptxUnit 1 Data Structures Introduction L1.pptx
Unit 1 Data Structures Introduction L1.pptx
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data Structures
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf
 
Data structure
Data structureData structure
Data structure
 
.DATA STRUCTURES
.DATA STRUCTURES  .DATA STRUCTURES
.DATA STRUCTURES
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
 
Data structures
Data structuresData structures
Data structures
 
UNIT II.docx
UNIT II.docxUNIT II.docx
UNIT II.docx
 
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
 
Summer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & AlgorithmsSummer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & Algorithms
 

Recently uploaded

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Recently uploaded (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Classification of DS.pptx

  • 1. Introduction to Data Structure Dr. Vimmi Pandey 1
  • 2. Basic Terminologies ● Data Structure – Data: are simply a value are set of values of different type which is called data types like string, integer, char etc. – Structure: Way of organizing information, so that it is easier to use – In simple words we can define data structures as ● Its a way organizingdata in such a way so that data can be easier to use. 2
  • 3. Basic Terminologies ● Data Structure .. – A data structure is a particular way of organizing data in a computer so that it can be used efifciently. – A scheme for organizing related pieces of information. 3
  • 4. Why Data Structure ● ● ● Human requirement with computer are going to complex day by day. To solve the complex requirements in efficient way we need this study. Provide fastest solution of human requirements. Provide efficient solution of complex problem. – Space – Time 4
  • 5. Study in Data Structure ● Logical or mathematical description of the ● structure. Implementation of structure on a computer ● using different computer languages ( C, C++, JAVA, pl-languages etc.) Qunatitative analysis of the structure, which includes determining the amount of memory needed to store the structure and the time required to process the structure. 5
  • 6. Classification of Data Structure Data Structure Primitive Data Structure Non primitive Data Structure Linear Data Structure Non-Linear Data Structure Array Linked List Stack Queue Tree Graph Files Integer Float Character Pointer zaid shabbir 6
  • 7. Classification of Data Structure ... ● Simple Data Structure: Simple data structure can be constructed with the help of primitive data structure. A primitive data structure used to represent the standard data types of any one of the computer languages (integer, Character, float etc.). ● Compound Data Structure: Compound data structure can be constructed with the help of any one of the primitive data structure and it is having a specific functionality. It can be designed by user. It can be classified as Linear and Non-Linear Data Structure. . 7
  • 8. Classification of Data Structure ... ● Linear Data Structures: A linear data structure traverses the data elements sequentially, in which only one data element can directly be reached. Ex: Arrays, Linked Lists ● Non-Linear Data Structures: Every data item is attached to several other data items in a way that is specific for reflecting relationships. The data items are not arranged in a sequential structure. Ex: Trees, Graphs 8
  • 9. Operation on Linear/Non-Linear Data Structure ● ● ● ● ● Add an element Delete an element Traverse / Display Sort the list of elements Search for a data element 9
  • 10. Types of Data Structure ● Array: is commonly used in computer programming to mean a contiguous block of memory locations, where each memory location stores one fixed-length data item. e.g. Array of Integers int a[10], Array of Character char b[10] Array of Integers 0 1 2 3 4 5 6 7 8 9 5 6 4 3 7 8 9 2 1 2 Array of Character 0 1 2 3 4 5 6 7 8 9 5 6 4 3 7 8 9 2 1 2 10
  • 11. Types of Data Structure ... Stack: A stack is a data structure in which items can be inserted only from one end and get items back from the same end. There , the last item inserted into stack, is the the first item to be taken out from the stack. In short its also called Last in First out [LIFO]. 11
  • 12. Types of Data Structure ... ended data structure which items can Queue: A queue is two in be inserted from one end and taken out from the other end. Therefore , the first item inserted into queue is the first item to be taken out from the queue. This property is called First in First out [FIFO]. 12
  • 13. Types of Data Structure ... Linked List: Could alternately used to store items. In linked list space to store items is created as is needed and destroyed when space no longer required to store items. Hence linked list is a dynamic data structure space acquire only when need. 13
  • 14. Types of Data Structure ... Tree: is a non-linear data structure which is mainly used to represent data containing a hierarchical relationship between elements. Binary Tree: A binary tree is a tree such that every node has at most 2 child and each node is labeled as either left of right child. 14
  • 15. Types of Data Structure ... 15
  • 16. Types of Data Structure ... Graph: It is a set of items connected by edges. Each item is called a vertex or node. Trees are just like a special kinds of graphs. Graphs are usually represented by G = (V, E), where V is the set vertices and E is the set of Edges. 16
  • 17. Types of Data Structure ... Undirected Graph: A graph whose edges are unordered pair of vertices. That is each edge connects two vertices. In an undirected graph, direction is not important, if the path is available, it can be traversed in any direction. 17
  • 18. Types of Data Structure ... Directed Graph: In directed graph a directional edge connect two node/vertex. If there is one edge from one vertex to other then only this path can be followed. 18
  • 19. Types of Data Structure ... Weighted Graph: A graph having a weight, ornumber associated with each edge 19
  • 20. Selecting a Data Structure ● ● ● Analyze the problem to determine the resource constraints a solution must meet. Determine the basic operations that must be supported. Quantify the resource constraints for each operation. Select the data structure that best meets these requirements. 20