SlideShare a Scribd company logo
1 of 21
Data Structures -
Introduction
S.Deepa
Assistant professor
Department of computer technology – pg
Kongu engineering college, erode
What is Data Structure?
ī‚´ Data structure is a representation of the logical relationship
existing between individual elements of data.
ī‚´ Data Structure is a way of organizing all data items that considers
not only the elements stored but also their relationship to each other.
STORAGE AND FILE STRUCTURES
ī‚´ The representation of particular data structure in the main memory of a
computer is called as storage structure.
ī‚´ The storage structure representation in auxiliary memory is called as
file structure.
DATA STRUCTURES STUDY
ī‚´ Data structure study covers the following points
ī‚´ Amount of memory require to store.
ī‚´ Amount of time require to process.
ī‚´ Representation of data in memory.
ī‚´ Operations performed on that data.
TYPES OF DATA STRUCTURE
PRIMITIVE DATA STRUCTURES
ī‚´ Primitive data structures are basic structures and are directly operated
upon by machine instructions.
ī‚´ Primitive data structures have different representations on different
computers.
ī‚´ The Y are available in most programming languages as built in type.
ī‚´Integer: It is a data type which allows all values without fraction part.
We can use it for whole numbers.
ī‚´Float: It is a data type which use for storing fractional numbers.
ī‚´Character: It is a data type which is used for character values.
NON PRIMITIVE DATA STRUCTURE
ī‚´ These are more sophisticated data structures.
ī‚´ These are derived from primitive data structures.
ī‚´ The non-primitive data structures emphasize on structuring of a group of
homogeneous or heterogeneous data items.
ī‚´ Examples of Non-primitive data type are Array, List, and File etc.
ī‚´ A Non-primitive data type is further divided into Linear and Non-Linear data
structure
ī‚´ Array: An array is a fixed-size sequenced collection of elements of the same
data type.
ī‚´ List: An ordered set containing variable number of elements is called as Lists.
LINEAR DATA STRUCTURES
ī‚´ A data structure is said to be Linear, if its elements are connected
in linear fashion by means of logically or in sequence memory
locations.
ī‚´ There are two ways to represent a linear data structure in
memory,
ī‚´Static memory allocation
ī‚´Dynamic memory allocation
STACK
ī‚´ Examples of Linear Data Structure are Stack and Queue.
ī‚´ Stack: Stack is a data structure in which insertion and deletion operations are
performed at one end only.
ī‚§ The insertion operation is referred to as ‘PUSH’ and deletion operation is referred to as
‘POP’ operation.
ī‚§ Stack is also called as Last in First out (LIFO) data structure.
QUEUE
ī‚´ Queue: The data structure which permits the insertion at one end and Deletion at another
end, known as Queue.
ī‚§ End at which deletion is occurs is known as FRONT end and another end at which insertion
occurs is known as REAR end.
ī‚§ Queue is also called as First in First out (FIFO) data structure.
NONLINEAR DATA STRUCTURES
ī‚´ Nonlinear data structures are those data structure in which data items are not
arranged in a sequence.
ī‚´ Examples of Non-linear Data Structure are Tree and Graph.
ī‚´ Tree: A tree can be defined as finite set of data items (nodes) in which data items
are arranged in branches and sub branches according to requirement.
ī‚´ Trees represent the hierarchical relationship between various elements.
ī‚´ Tree consist of nodes connected by edge, the node represented by circle and
edge lives connecting to circle.
GRAPH
ī‚´ Graph is a collection of nodes (Information) and connecting edges (Logical relation) between
nodes.
ī‚´ A tree can be viewed as restricted graph.
ī‚´ Graphs have many types:
ī‚§ Un-directed Graph
ī‚§ Directed Graph
ī‚§ Mixed Graph
ī‚§ Multi Graph
ī‚§ Simple Graph
ī‚§ Null Graph
ī‚§ Weighted Graph
LINEAR VS NONLINEAR DATA STRUCTURE
ī‚´
LINEAR DATA STRUCTURE NON LINEAR DATA STRUCTURE
Every item is related to its previous and
next time
Every item is attached with many other
items
Data is arranged in linear sequence Data is not arranged in sequence.
Data items can be traversed in a single
run.
Data cannot be traversed in a single run.
Eg. Array, Stacks, linked list, queue. Eg. tree, graph.
Implementation is easy. Implementation is difficult.
OPERATIONS ON DATA STRUCTURES
ī‚´ Create
The create operation results in reserving memory for program elements.
This can be done by declaration statement. Creation of data structure may take
place either during compile-time or run-time. malloc() function of C language
is used for creation.
ī‚´ Destroy
Destroy operation destroys memory space allocated for specified data
structure. free() function of C language is used to destroy data structure.
ī‚´ Selection
Selection operation deals with accessing a particular data within a data
structure.
OPERATIONS ON DATA STRUCTURES
ī‚´ Searching
It finds the presence of desired data item in the list of data items, it may also find the locations of
all elements that satisfy certain conditions.
ī‚´ Sorting
Sorting is a process of arranging all data items in a data structure in a particular order, say for
example, either in ascending order or in descending order.
ī‚´ Merging
Merging is a process of combining the data items of two different sorted list into a single sorted
list.
ī‚´ Splitting
Splitting is a process of partitioning single list to multiple list.
ī‚´ Traversal
Traversal is a process of visiting each and every node of a list in systematic manner.
ALGORITHM EFFICIENCY
ī‚´ Some algorithms are more efficient than others. We would prefer to
choose an efficient algorithm, so it would be nice to have metrics for
comparing algorithm efficiency.
ī‚´ The complexity of an algorithm is a function describing the
efficiency of the algorithm in terms of the amount of data the
algorithm must process.
ī‚´ Usually there are natural units for the domain and range of this
function. There are two main complexity measures of the efficiency
of an algorithm.
TIME COMPLEXITY
ī‚´ Time complexity is a function describing the amount of time an
algorithm takes in terms of the amount of input to algorithm.
ī‚´ "Time" can mean the number of memory accesses performed, the
number of comparisons between integers, the number of times
some inner loop is executed, or some other natural unit related to
the amount of real time the algorithm will take.
SPACE COMPLEXITY
ī‚´Space complexity is a function describing the amount of memory
(space) an algorithm takes in terms of the amount of input to the
algorithm.
ī‚´We can use bytes, but it's easier to use, say, number of integers used,
number of fixed-sized structures, etc. In the end, the function we
come up with will be independent of the actual number of bytes
needed to represent the unit.
WORST CASE ANALYSIS
ī‚´ In the worst case analysis, we calculate the upper bound on the running
time of an algorithm.
ī‚´ We must know the case that causes the maximum number of operations
to be executed.
ī‚´ For Linear Search, the worst case happens when the element to be
searched is not present in the array.
ī‚´ When x is not present, the search () function compares it with all the
elements of array [] one by one.
ī‚´ Therefore, the worst case time complexity of linear search would be.
AVERAGE CASE ANALYSIS
ī‚´ In average case analysis, we take all possible inputs and calculate
computing time for all of the inputs.
ī‚´ Sum all the calculated values and divide the sum by total number
of inputs.
ī‚´ We must know (or predict) distribution of cases.
ī‚´ For the linear search problem, let us assume that all cases are
uniformly distributed. So we sum all the cases and divide the sum
by (n+1).
BEST CASE ANALYSIS
ī‚´ In the best case analysis, we calculate lower bound on running time of an
algorithm.
ī‚´ We must know the case that causes minimum number of operations to be
executed.
ī‚´ In the linear search problem, the best case occurs when x is present at the
first location.
ī‚´ The number of operations in worst case is constant (not dependent on n).
ī‚´ So time complexity in the best case would be.

More Related Content

What's hot

DATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTESDATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTESAniruddha Paul
 
Artificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional LogicArtificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional LogicSaravanan T.M
 
Data Reduction
Data ReductionData Reduction
Data ReductionRajan Shah
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure pptNalinNishant3
 
Statistics And Probability Tutorial | Statistics And Probability for Data Sci...
Statistics And Probability Tutorial | Statistics And Probability for Data Sci...Statistics And Probability Tutorial | Statistics And Probability for Data Sci...
Statistics And Probability Tutorial | Statistics And Probability for Data Sci...Edureka!
 
02 Machine Learning - Introduction probability
02 Machine Learning - Introduction probability02 Machine Learning - Introduction probability
02 Machine Learning - Introduction probabilityAndres Mendez-Vazquez
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsSalah Amean
 
Unsupervised learning (clustering)
Unsupervised learning (clustering)Unsupervised learning (clustering)
Unsupervised learning (clustering)Pravinkumar Landge
 
Encapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistenceEncapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistencePrem Lamsal
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimizationlavanya marichamy
 
Data Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model SelectionData Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model SelectionDerek Kane
 
Exploratory data analysis with Python
Exploratory data analysis with PythonExploratory data analysis with Python
Exploratory data analysis with PythonDavis David
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notationmustafa sarac
 
Edge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringEdge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringDr. Abdul Ahad Abro
 
Introduction to Data Structure
Introduction to Data Structure Introduction to Data Structure
Introduction to Data Structure Prof Ansari
 

What's hot (20)

DATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTESDATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTES
 
Artificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional LogicArtificial Intelligence - Propositional Logic
Artificial Intelligence - Propositional Logic
 
Data Reduction
Data ReductionData Reduction
Data Reduction
 
AI 3 | Uninformed Search
AI 3 | Uninformed SearchAI 3 | Uninformed Search
AI 3 | Uninformed Search
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
 
Statistics And Probability Tutorial | Statistics And Probability for Data Sci...
Statistics And Probability Tutorial | Statistics And Probability for Data Sci...Statistics And Probability Tutorial | Statistics And Probability for Data Sci...
Statistics And Probability Tutorial | Statistics And Probability for Data Sci...
 
02 Machine Learning - Introduction probability
02 Machine Learning - Introduction probability02 Machine Learning - Introduction probability
02 Machine Learning - Introduction probability
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
 
Essential NumPy
Essential NumPyEssential NumPy
Essential NumPy
 
Unsupervised learning (clustering)
Unsupervised learning (clustering)Unsupervised learning (clustering)
Unsupervised learning (clustering)
 
Empirical analysis
Empirical analysisEmpirical analysis
Empirical analysis
 
Complexity analysis in Algorithms
Complexity analysis in AlgorithmsComplexity analysis in Algorithms
Complexity analysis in Algorithms
 
Encapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistenceEncapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistence
 
AD3251-Data Structures Design-Notes-Tree.pdf
AD3251-Data Structures  Design-Notes-Tree.pdfAD3251-Data Structures  Design-Notes-Tree.pdf
AD3251-Data Structures Design-Notes-Tree.pdf
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimization
 
Data Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model SelectionData Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model Selection
 
Exploratory data analysis with Python
Exploratory data analysis with PythonExploratory data analysis with Python
Exploratory data analysis with Python
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
Edge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringEdge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloring
 
Introduction to Data Structure
Introduction to Data Structure Introduction to Data Structure
Introduction to Data Structure
 

Similar to Data structures - Introduction

introduction about data structure_i.pptx
introduction about data structure_i.pptxintroduction about data structure_i.pptx
introduction about data structure_i.pptxpoonamsngr
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxsarala9
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS Adams Sidibe
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresresamplopsurat
 
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptDATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptyarotos643
 
Data structure Assignment Help
Data structure Assignment HelpData structure Assignment Help
Data structure Assignment HelpJosephErin
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureadeel hamid
 
data structures module I & II.pptx
data structures module I & II.pptxdata structures module I & II.pptx
data structures module I & II.pptxrani marri
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfChapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfAxmedcarb
 
data structure details of types and .ppt
data structure details of types and .pptdata structure details of types and .ppt
data structure details of types and .pptpoonamsngr
 
Introduction to data structures (ss)
Introduction to data structures (ss)Introduction to data structures (ss)
Introduction to data structures (ss)Madishetty Prathibha
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxssuser031f35
 
data structure programing language in c.ppt
data structure programing language in c.pptdata structure programing language in c.ppt
data structure programing language in c.pptLavkushGupta12
 

Similar to Data structures - Introduction (20)

CSE 443 (1).pptx
CSE 443 (1).pptxCSE 443 (1).pptx
CSE 443 (1).pptx
 
introduction about data structure_i.pptx
introduction about data structure_i.pptxintroduction about data structure_i.pptx
introduction about data structure_i.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
1597380885789.ppt
1597380885789.ppt1597380885789.ppt
1597380885789.ppt
 
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.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptDATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
 
PM.ppt
PM.pptPM.ppt
PM.ppt
 
Data structure Assignment Help
Data structure Assignment HelpData structure Assignment Help
Data structure Assignment Help
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
data structures module I & II.pptx
data structures module I & II.pptxdata structures module I & II.pptx
data structures module I & II.pptx
 
PM.ppt
PM.pptPM.ppt
PM.ppt
 
Chapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdfChapter 1 Introduction to Data Structures and Algorithms.pdf
Chapter 1 Introduction to Data Structures and Algorithms.pdf
 
data structure details of types and .ppt
data structure details of types and .pptdata structure details of types and .ppt
data structure details of types and .ppt
 
Introduction to data structures (ss)
Introduction to data structures (ss)Introduction to data structures (ss)
Introduction to data structures (ss)
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
Intro ds
Intro dsIntro ds
Intro ds
 
data structure programing language in c.ppt
data structure programing language in c.pptdata structure programing language in c.ppt
data structure programing language in c.ppt
 

More from DeepaThirumurugan

Creating a Binary tree from a General Tree.pptx
Creating a Binary tree from a General Tree.pptxCreating a Binary tree from a General Tree.pptx
Creating a Binary tree from a General Tree.pptxDeepaThirumurugan
 
Difference between traditional and agile software development
Difference between traditional and agile software developmentDifference between traditional and agile software development
Difference between traditional and agile software developmentDeepaThirumurugan
 
Agile Development Models
Agile Development ModelsAgile Development Models
Agile Development ModelsDeepaThirumurugan
 

More from DeepaThirumurugan (6)

APACHE SPARK.pptx
APACHE SPARK.pptxAPACHE SPARK.pptx
APACHE SPARK.pptx
 
IO organization.ppt
IO organization.pptIO organization.ppt
IO organization.ppt
 
Creating a Binary tree from a General Tree.pptx
Creating a Binary tree from a General Tree.pptxCreating a Binary tree from a General Tree.pptx
Creating a Binary tree from a General Tree.pptx
 
Difference between traditional and agile software development
Difference between traditional and agile software developmentDifference between traditional and agile software development
Difference between traditional and agile software development
 
Agile Development Models
Agile Development ModelsAgile Development Models
Agile Development Models
 
Cloud Computing
Cloud Computing Cloud Computing
Cloud Computing
 

Recently uploaded

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...
Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...
Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...shivangimorya083
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Callshivangimorya083
 
Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝soniya singh
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 

Recently uploaded (20)

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...
Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...
Full night đŸĨĩ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌ī¸o...
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎ī¸ Hard And Sexy Vip Call
 
Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi đŸ’¯Call Us 🔝8264348440🔝
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 

Data structures - Introduction

  • 1. Data Structures - Introduction S.Deepa Assistant professor Department of computer technology – pg Kongu engineering college, erode
  • 2. What is Data Structure? ī‚´ Data structure is a representation of the logical relationship existing between individual elements of data. ī‚´ Data Structure is a way of organizing all data items that considers not only the elements stored but also their relationship to each other.
  • 3. STORAGE AND FILE STRUCTURES ī‚´ The representation of particular data structure in the main memory of a computer is called as storage structure. ī‚´ The storage structure representation in auxiliary memory is called as file structure.
  • 4. DATA STRUCTURES STUDY ī‚´ Data structure study covers the following points ī‚´ Amount of memory require to store. ī‚´ Amount of time require to process. ī‚´ Representation of data in memory. ī‚´ Operations performed on that data.
  • 5. TYPES OF DATA STRUCTURE
  • 6. PRIMITIVE DATA STRUCTURES ī‚´ Primitive data structures are basic structures and are directly operated upon by machine instructions. ī‚´ Primitive data structures have different representations on different computers. ī‚´ The Y are available in most programming languages as built in type. ī‚´Integer: It is a data type which allows all values without fraction part. We can use it for whole numbers. ī‚´Float: It is a data type which use for storing fractional numbers. ī‚´Character: It is a data type which is used for character values.
  • 7. NON PRIMITIVE DATA STRUCTURE ī‚´ These are more sophisticated data structures. ī‚´ These are derived from primitive data structures. ī‚´ The non-primitive data structures emphasize on structuring of a group of homogeneous or heterogeneous data items. ī‚´ Examples of Non-primitive data type are Array, List, and File etc. ī‚´ A Non-primitive data type is further divided into Linear and Non-Linear data structure ī‚´ Array: An array is a fixed-size sequenced collection of elements of the same data type. ī‚´ List: An ordered set containing variable number of elements is called as Lists.
  • 8. LINEAR DATA STRUCTURES ī‚´ A data structure is said to be Linear, if its elements are connected in linear fashion by means of logically or in sequence memory locations. ī‚´ There are two ways to represent a linear data structure in memory, ī‚´Static memory allocation ī‚´Dynamic memory allocation
  • 9. STACK ī‚´ Examples of Linear Data Structure are Stack and Queue. ī‚´ Stack: Stack is a data structure in which insertion and deletion operations are performed at one end only. ī‚§ The insertion operation is referred to as ‘PUSH’ and deletion operation is referred to as ‘POP’ operation. ī‚§ Stack is also called as Last in First out (LIFO) data structure.
  • 10. QUEUE ī‚´ Queue: The data structure which permits the insertion at one end and Deletion at another end, known as Queue. ī‚§ End at which deletion is occurs is known as FRONT end and another end at which insertion occurs is known as REAR end. ī‚§ Queue is also called as First in First out (FIFO) data structure.
  • 11. NONLINEAR DATA STRUCTURES ī‚´ Nonlinear data structures are those data structure in which data items are not arranged in a sequence. ī‚´ Examples of Non-linear Data Structure are Tree and Graph. ī‚´ Tree: A tree can be defined as finite set of data items (nodes) in which data items are arranged in branches and sub branches according to requirement. ī‚´ Trees represent the hierarchical relationship between various elements. ī‚´ Tree consist of nodes connected by edge, the node represented by circle and edge lives connecting to circle.
  • 12. GRAPH ī‚´ Graph is a collection of nodes (Information) and connecting edges (Logical relation) between nodes. ī‚´ A tree can be viewed as restricted graph. ī‚´ Graphs have many types: ī‚§ Un-directed Graph ī‚§ Directed Graph ī‚§ Mixed Graph ī‚§ Multi Graph ī‚§ Simple Graph ī‚§ Null Graph ī‚§ Weighted Graph
  • 13. LINEAR VS NONLINEAR DATA STRUCTURE ī‚´ LINEAR DATA STRUCTURE NON LINEAR DATA STRUCTURE Every item is related to its previous and next time Every item is attached with many other items Data is arranged in linear sequence Data is not arranged in sequence. Data items can be traversed in a single run. Data cannot be traversed in a single run. Eg. Array, Stacks, linked list, queue. Eg. tree, graph. Implementation is easy. Implementation is difficult.
  • 14. OPERATIONS ON DATA STRUCTURES ī‚´ Create The create operation results in reserving memory for program elements. This can be done by declaration statement. Creation of data structure may take place either during compile-time or run-time. malloc() function of C language is used for creation. ī‚´ Destroy Destroy operation destroys memory space allocated for specified data structure. free() function of C language is used to destroy data structure. ī‚´ Selection Selection operation deals with accessing a particular data within a data structure.
  • 15. OPERATIONS ON DATA STRUCTURES ī‚´ Searching It finds the presence of desired data item in the list of data items, it may also find the locations of all elements that satisfy certain conditions. ī‚´ Sorting Sorting is a process of arranging all data items in a data structure in a particular order, say for example, either in ascending order or in descending order. ī‚´ Merging Merging is a process of combining the data items of two different sorted list into a single sorted list. ī‚´ Splitting Splitting is a process of partitioning single list to multiple list. ī‚´ Traversal Traversal is a process of visiting each and every node of a list in systematic manner.
  • 16. ALGORITHM EFFICIENCY ī‚´ Some algorithms are more efficient than others. We would prefer to choose an efficient algorithm, so it would be nice to have metrics for comparing algorithm efficiency. ī‚´ The complexity of an algorithm is a function describing the efficiency of the algorithm in terms of the amount of data the algorithm must process. ī‚´ Usually there are natural units for the domain and range of this function. There are two main complexity measures of the efficiency of an algorithm.
  • 17. TIME COMPLEXITY ī‚´ Time complexity is a function describing the amount of time an algorithm takes in terms of the amount of input to algorithm. ī‚´ "Time" can mean the number of memory accesses performed, the number of comparisons between integers, the number of times some inner loop is executed, or some other natural unit related to the amount of real time the algorithm will take.
  • 18. SPACE COMPLEXITY ī‚´Space complexity is a function describing the amount of memory (space) an algorithm takes in terms of the amount of input to the algorithm. ī‚´We can use bytes, but it's easier to use, say, number of integers used, number of fixed-sized structures, etc. In the end, the function we come up with will be independent of the actual number of bytes needed to represent the unit.
  • 19. WORST CASE ANALYSIS ī‚´ In the worst case analysis, we calculate the upper bound on the running time of an algorithm. ī‚´ We must know the case that causes the maximum number of operations to be executed. ī‚´ For Linear Search, the worst case happens when the element to be searched is not present in the array. ī‚´ When x is not present, the search () function compares it with all the elements of array [] one by one. ī‚´ Therefore, the worst case time complexity of linear search would be.
  • 20. AVERAGE CASE ANALYSIS ī‚´ In average case analysis, we take all possible inputs and calculate computing time for all of the inputs. ī‚´ Sum all the calculated values and divide the sum by total number of inputs. ī‚´ We must know (or predict) distribution of cases. ī‚´ For the linear search problem, let us assume that all cases are uniformly distributed. So we sum all the cases and divide the sum by (n+1).
  • 21. BEST CASE ANALYSIS ī‚´ In the best case analysis, we calculate lower bound on running time of an algorithm. ī‚´ We must know the case that causes minimum number of operations to be executed. ī‚´ In the linear search problem, the best case occurs when x is present at the first location. ī‚´ The number of operations in worst case is constant (not dependent on n). ī‚´ So time complexity in the best case would be.