SlideShare a Scribd company logo
1 of 12
TYPES
OF
DATA STRUCTURES
P.Prathibha,
Lecturer
Topics
Introduction to Data structures
Types of Data structures
Data structure is
• representation of the logical relationship existing between individual elements of data.
• a specialized format for organizing and storing data in memory that considers not only the
elements stored but also their relationship to each other.
• about arranging and storing of data in such a way so that it can be accessed and used
efficiently.
• We define a data structure as a way of organizing data that specifies
1. a set of data elements, i,e,, a data object; and
2. a set of operations that are applied to this data object.
• These two sets form a mathematical construct that may be implemented using a particular
programming language.
• The data structure is independent of their implementation.
Introduction to Data Structures
The various types of data structures are:
1. Primitive and non-primitive
2. Linear and non-linear
3. Static and dynamic
4. Persistent and ephemeral
5. Sequential and direct access
TYPES OF DATA STRUCTURES
Primitive and Non-Primitive Data Structure
 Primitive Data Structures are the basic data structures that directly operate upon the
machine instructions.
 Primitive data structures define a set of primitive elements that do not involve any
other elements as its sub-parts.
For example, data structures defined for integers and characters.
 These are generally primary or built-in data types in programming languages
 They have different representations on different computers.
 Integers, Floating point numbers, Character constants, String constants and Pointers c
ome under this category.
 Non-primitive data structures are more complicated data structures and are derived f
rom primitive data structures.
 They emphasize on grouping same or different data items with relationship between
each data item.
 Arrays, Lists and Files come under this category.
 Arrays in C++ consist of a set of similar type of elements.
 Class and Structure are other examples of non-primitive data structures, which
consist of a set of elements that may be of different data types and functions to o
perate on.
 A data structure is said to be linear if its elements form a sequence or a linear list.
Example: Arrays, linked list, stack, queue.
 In a linear data structure, every data element has a unique successor and
predecessor.
 There are two basic ways of representing linear structures in memory.
 One way is to have the relationship between the elements by means of pointers
(links), called linked lists.
 The other way is using sequential organization, that is, arrays.
 In linear data structure, single level is involved. Therefore, we can traverse all the
elements in single run only.
 Linear data structures are easy to implement because computer memory is
arranged in a linear way.
Linear and Non-Linear Data Structure
 Non-linear data structure are used to represent the data containing hierarchical or
network relationship among the elements.
Examples: Trees, Graphs, Heaps etc.
 In non-linear data structures, every data element may have more than one predecessor as well as
successor.
 Elements do not form any particular linear sequence.
 In a non-linear data structure, single level is not involved. So, we can’t traverse all the elements in
single run only.
 Non-linear data structures are not easy to implement in comparison to linear data structure.
 It utilizes computer memory efficiently in comparison to a linear data structure.
contd..
 A data structure is static if it is created before program execution begins (also
called during compilation time).
 Static Data Structure means set of data, but that does not mean that we cannot ch
ange the assigned value of elements.
 Here static means the size of data type is fixed.
 Memory size allocated to 'data' is fixed.
 The variables of static data structure have user-specified names.
 An array is a static data structure
 Dynamic data structure is used for dynamic memory management.
 A data structure that is created at run-time is called dynamic data structure.
 The variables of this type are not always referenced by a user-defined name. The
se are accessed
 indirectly using their addresses through pointers.
 A linked list is a dynamic data structure when realized using dynamic memory
management and pointers.
 Non-linear data structures are generally implemented in the same way as linked
lists. Hence, trees and graphs can be implemented as dynamic data structures.
Static and Dynamic Data structure
A data structure that supports operations on the most recent version as well
as the pervious is known as persistent data structure.
 A persistent data structure is partially persistent if any version can be acces
sed but only the most recent one can be updated; it is fully persistent if any v
ersion can be both accessed and updated.
An ephemeral data structure is one that supports operations only on the mo
st recent version.
The distinction between ephemeral and persistent data structure is essential
ly the distinction between functional (also called effect free) and conventio
nal imperative (also called effect full) programming paradigms.
 The functional data structures are persistent and the imperative data struct
ures are ephemeral.
 Sequential access means that to acces the nth
element, we must access the preceeding (n-1)
data elements.
 A linked list is a sequential access data
structure.
 Direct access means that any element can be
assessed without accessing its predecessor or
successor, we can directly access the nth
element.
 An array is an example of direct access data
structure.
 Introduction to Data structures
 Types of Data structures
Summary
Types of datastructures

More Related Content

What's hot

Data structures Lecture no. 2
Data structures Lecture no. 2Data structures Lecture no. 2
Data structures Lecture no. 2AzharIqbal710687
 
Data Structure - Elementary Data Organization
Data Structure - Elementary  Data Organization Data Structure - Elementary  Data Organization
Data Structure - Elementary Data Organization Uma mohan
 
Data structure (basics)
Data structure (basics)Data structure (basics)
Data structure (basics)ShrushtiGole
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisationMuzamil Hussain
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structuresunilchute1
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data Structuresnayanbanik
 
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
 
Basic terminologies
Basic terminologiesBasic terminologies
Basic terminologiesRajendran
 
Data Structures - Lecture 2 [Introduction to Data Structures]
Data Structures - Lecture 2 [Introduction to Data Structures]Data Structures - Lecture 2 [Introduction to Data Structures]
Data Structures - Lecture 2 [Introduction to Data Structures]Muhammad Hammad Waseem
 
introduction to Data Structure and classification
 introduction to Data Structure and classification introduction to Data Structure and classification
introduction to Data Structure and classificationchauhankapil
 
Over view of data structures
Over view of data structuresOver view of data structures
Over view of data structuresNagajothiN1
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data StructureJazz Jinia Bhowmik
 

What's hot (20)

Data structures Lecture no. 2
Data structures Lecture no. 2Data structures Lecture no. 2
Data structures Lecture no. 2
 
Data Structure - Elementary Data Organization
Data Structure - Elementary  Data Organization Data Structure - Elementary  Data Organization
Data Structure - Elementary Data Organization
 
Data struters
Data strutersData struters
Data struters
 
Data structure (basics)
Data structure (basics)Data structure (basics)
Data structure (basics)
 
Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisation
 
Ch1
Ch1Ch1
Ch1
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data Structures
 
Lect 1-2
Lect 1-2Lect 1-2
Lect 1-2
 
Data structure
Data  structureData  structure
Data structure
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
 
Lists
ListsLists
Lists
 
Basic terminologies
Basic terminologiesBasic terminologies
Basic terminologies
 
Data structure
Data structureData structure
Data structure
 
Data Structures - Lecture 2 [Introduction to Data Structures]
Data Structures - Lecture 2 [Introduction to Data Structures]Data Structures - Lecture 2 [Introduction to Data Structures]
Data Structures - Lecture 2 [Introduction to Data Structures]
 
introduction to Data Structure and classification
 introduction to Data Structure and classification introduction to Data Structure and classification
introduction to Data Structure and classification
 
Over view of data structures
Over view of data structuresOver view of data structures
Over view of data structures
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
 
Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 

Similar to Types of datastructures

Data structure power point presentation
Data structure power point presentation Data structure power point presentation
Data structure power point presentation Anil Kumar Prajapati
 
data structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptxdata structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptxVicky Singh
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresresamplopsurat
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureadeel hamid
 
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
 
Data struchers and algorithms
Data struchers and algorithmsData struchers and algorithms
Data struchers and algorithmsjunnubabu
 
Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Tutort Academy
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
PPT Format prashant .pptx
PPT Format prashant .pptxPPT Format prashant .pptx
PPT Format prashant .pptxSafdarAli435862
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxsarala9
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxDCABCA
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS Adams Sidibe
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxssuser031f35
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxajajkhan16
 
introduction about data structure_i.pptx
introduction about data structure_i.pptxintroduction about data structure_i.pptx
introduction about data structure_i.pptxpoonamsngr
 

Similar to Types of datastructures (20)

Data structure power point presentation
Data structure power point presentation Data structure power point presentation
Data structure power point presentation
 
data structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptxdata structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptx
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresres
 
Datastructures Notes
Datastructures NotesDatastructures Notes
Datastructures Notes
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
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
 
Data struchers and algorithms
Data struchers and algorithmsData struchers and algorithms
Data struchers and algorithms
 
Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
PPT Format prashant .pptx
PPT Format prashant .pptxPPT Format prashant .pptx
PPT Format prashant .pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
Data structures
Data structuresData structures
Data structures
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
 
.DATA STRUCTURES
.DATA STRUCTURES  .DATA STRUCTURES
.DATA STRUCTURES
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptx
 
Data structures slideshare
Data structures slideshareData structures slideshare
Data structures slideshare
 
introduction about data structure_i.pptx
introduction about data structure_i.pptxintroduction about data structure_i.pptx
introduction about data structure_i.pptx
 

More from Madishetty Prathibha

More from Madishetty Prathibha (13)

Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - Introduction
 
Access modifiers in java
Access modifiers in javaAccess modifiers in java
Access modifiers in java
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
Control statements in java
Control statements in javaControl statements in java
Control statements in java
 
Classes objects in java
Classes objects in javaClasses objects in java
Classes objects in java
 
Structure of java program diff c- cpp and java
Structure of java program  diff c- cpp and javaStructure of java program  diff c- cpp and java
Structure of java program diff c- cpp and java
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Java data types, variables and jvm
Java data types, variables and jvm Java data types, variables and jvm
Java data types, variables and jvm
 
Java Tokens
Java  TokensJava  Tokens
Java Tokens
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Java features
Java  features Java  features
Java features
 
Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
 

Recently uploaded

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesSHIVANANDaRV
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 

Recently uploaded (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 

Types of datastructures

  • 2. Topics Introduction to Data structures Types of Data structures
  • 3. Data structure is • representation of the logical relationship existing between individual elements of data. • a specialized format for organizing and storing data in memory that considers not only the elements stored but also their relationship to each other. • about arranging and storing of data in such a way so that it can be accessed and used efficiently. • We define a data structure as a way of organizing data that specifies 1. a set of data elements, i,e,, a data object; and 2. a set of operations that are applied to this data object. • These two sets form a mathematical construct that may be implemented using a particular programming language. • The data structure is independent of their implementation. Introduction to Data Structures
  • 4. The various types of data structures are: 1. Primitive and non-primitive 2. Linear and non-linear 3. Static and dynamic 4. Persistent and ephemeral 5. Sequential and direct access TYPES OF DATA STRUCTURES
  • 5. Primitive and Non-Primitive Data Structure  Primitive Data Structures are the basic data structures that directly operate upon the machine instructions.  Primitive data structures define a set of primitive elements that do not involve any other elements as its sub-parts. For example, data structures defined for integers and characters.  These are generally primary or built-in data types in programming languages  They have different representations on different computers.  Integers, Floating point numbers, Character constants, String constants and Pointers c ome under this category.  Non-primitive data structures are more complicated data structures and are derived f rom primitive data structures.  They emphasize on grouping same or different data items with relationship between each data item.  Arrays, Lists and Files come under this category.  Arrays in C++ consist of a set of similar type of elements.  Class and Structure are other examples of non-primitive data structures, which consist of a set of elements that may be of different data types and functions to o perate on.
  • 6.  A data structure is said to be linear if its elements form a sequence or a linear list. Example: Arrays, linked list, stack, queue.  In a linear data structure, every data element has a unique successor and predecessor.  There are two basic ways of representing linear structures in memory.  One way is to have the relationship between the elements by means of pointers (links), called linked lists.  The other way is using sequential organization, that is, arrays.  In linear data structure, single level is involved. Therefore, we can traverse all the elements in single run only.  Linear data structures are easy to implement because computer memory is arranged in a linear way. Linear and Non-Linear Data Structure
  • 7.  Non-linear data structure are used to represent the data containing hierarchical or network relationship among the elements. Examples: Trees, Graphs, Heaps etc.  In non-linear data structures, every data element may have more than one predecessor as well as successor.  Elements do not form any particular linear sequence.  In a non-linear data structure, single level is not involved. So, we can’t traverse all the elements in single run only.  Non-linear data structures are not easy to implement in comparison to linear data structure.  It utilizes computer memory efficiently in comparison to a linear data structure. contd..
  • 8.  A data structure is static if it is created before program execution begins (also called during compilation time).  Static Data Structure means set of data, but that does not mean that we cannot ch ange the assigned value of elements.  Here static means the size of data type is fixed.  Memory size allocated to 'data' is fixed.  The variables of static data structure have user-specified names.  An array is a static data structure  Dynamic data structure is used for dynamic memory management.  A data structure that is created at run-time is called dynamic data structure.  The variables of this type are not always referenced by a user-defined name. The se are accessed  indirectly using their addresses through pointers.  A linked list is a dynamic data structure when realized using dynamic memory management and pointers.  Non-linear data structures are generally implemented in the same way as linked lists. Hence, trees and graphs can be implemented as dynamic data structures. Static and Dynamic Data structure
  • 9. A data structure that supports operations on the most recent version as well as the pervious is known as persistent data structure.  A persistent data structure is partially persistent if any version can be acces sed but only the most recent one can be updated; it is fully persistent if any v ersion can be both accessed and updated. An ephemeral data structure is one that supports operations only on the mo st recent version. The distinction between ephemeral and persistent data structure is essential ly the distinction between functional (also called effect free) and conventio nal imperative (also called effect full) programming paradigms.  The functional data structures are persistent and the imperative data struct ures are ephemeral.
  • 10.  Sequential access means that to acces the nth element, we must access the preceeding (n-1) data elements.  A linked list is a sequential access data structure.  Direct access means that any element can be assessed without accessing its predecessor or successor, we can directly access the nth element.  An array is an example of direct access data structure.
  • 11.  Introduction to Data structures  Types of Data structures Summary