SlideShare a Scribd company logo
1 of 17
ABSTRACT DATA TYPES
INTRODUCTION
• Data items are represented within a computer
as a sequence of binary digits.
• To distinguish between the different types of
data, the term type is often used to refer to a
collection of values and the term data type to
refer to a given type along with a collection of
operations for manipulating values of the
given type.
• The data types known as primitives come in
two categories : simple and complex.
• Simple data types :- values that are in the
most basic forms and cannot be decomposed
into smaller parts. Ex- Integer and real types.
• Complex data types:- constructed of multiple
components consisting of simple types or
other complex types. In python objects,
strings, list and dictionaries which can contain
multiple values are all examples of complex
types.
ABSTRACTIONS
• An Abstractions is a mechanism for separating
the properties of an object and restricting the
focus to those relevant in the current context.
• The user of the abstractions does not have to
understand all of the details in order to utilize
the object, but only those relevant to the
current task or problem.
TYPES OF ABSTRACTION
• 2 TYPES:-
1.Procedural abstraction – use of
function or method knowing what it does but
ignoring how it’s accomplished.
2. Data abstraction – separation of
the properties of a data type from the
implementation of that data type.
ABSTRACT DATA TYPES
• An abstract data type (or ADT) is a programmer
defined data type that specifies a set of data
values and a collection of well defined operations
that can be performed on those values.
• Abstract data types are defined independent of
their implementation, allowing us to focus on the
use of the new data type instead of how it’s
implemented.
• It is a type or class object which has its own
behavior and properties.
• Abstract data types can be viewed like black
boxes as illustrated below
• It is just a class defined in a standalone
manner. The class has definitions of all the
properties and functionalities defined in it.
• Whenever the a data structure is required, the
ADT file can be imported and objects of that
class can be created and used directly.
• Abstraction means just to show the users
what they want and hide the unwanted
technical details.
• There are several advantages of working with
abstract data types and focusing on the
“what” instead of the “how.”
– We can focus on solving the problem at hand instead of getting
bogged down in the implementation details.
– We can reduce logical errors that can occur from accidental misuse of
storage structures and data types by preventing direct access to the
implementation.
– The implementation of the abstract data type can be changed without
having to modify the program code that uses the ADT.
– It’s easier to manage and divide larger programs into smaller modules,
allowing different members of a team to work on the separate
modules.
Algorithmic Complexity
• Algorithmic complexity is a very important topic in
computer science.
• Knowing the complexity of algorithms allows you to answer
questions such as
 How long will a program run on an input?
 How much space will it take?
 Is the problem solvable?
• These are important bases of comparison between different
algorithms.
• An understanding of algorithmic complexity provides
programmers with insight into the efficiency of their code.
• Complexity is also important to several theoretical areas in
computer science, including algorithms, data structures, and
complexity theory
COMPLEXITY
• Any algorithm should have a way to measure
it.
• The standardized way of comparing
algorithms is complexity.
• All algorithms will have two complexities:-
a. Time complexity- is the measure of running
time of an algorithm.
b. Space complexity – is the measure of total
memory used by an algorithm.
Average and Worst case Analysis
• Worst-case complexity: The worst
case complexity is the complexity
of an algorithm when the input is
the worst possible with respect to
complexity.
• Average complexity: The average
complexity is the complexity of an
algorithm that is averaged over all
possible inputs ( assuming a
uniform distribution over the
inputs).
Why Worst Case Analysis?
Worst case running time : It is the longest running time for any input of
size n. We usually concentrate on finding only the worst-case running
time, that is, the longest running time for any input of size n, because
of the following reasons:
• The worst-case running time of an algorithm gives an upper bound
on the running time for any input. Knowing it provides a guarantee
that the algorithm will never take any longer.
• For some algorithms, the worst case occurs fairly often. For
example, in searching a database for a particular piece of
information, the searching algorithm’s worst case will often occur
when the information is not present in the database.
The “average case” is often roughly as bad as the worst case.
Asymptotic Analysis
• Goal : to simplify the analysis of running time by
getting rid of “details” which may be affected by
specific implementation and hardware
 like “rounding” : 1,000,001 = 1,000,000
• Capturing the essence : how the running time of an
algorithm increases with the size of the input in the
limit.
 Asymptotically more efficient algorithms are best for all
but small inputs.
Time complexity
• Running time may vary from one processor to another,
based on their processing speed and memory.
• Based on the internal resources availability , the
running time of an algorithm may differ.
• To overcome these difficulties, asymptotic notations
were introduced.
• Time complexity gives the total runtime of an
algorithm.
• Thus when a solution is designed, every module must
be highly optimized for time complexity, in order to
prevent wastage of computer resources.
• The time complexity is the amount of time required by
an algorithm to execute.
• It is measured in terms of number of operations rather
than computer time; because computer time is
dependent on the hardware, processor, etc..
• Every single step of execution in a program will consume
one unit time.
• For universal standards, this unit is not assigned any
metric and computation of all the steps is done at this
basic time unit level.
Some general order that we may consider
O(c) < O(log n ) < O(n) < O(n log n) < O(nc) <O(cn) < O(n!) <O(nn),
Where c is some constant.
Space complexity
• The space complexity of an algorithm is the
amount of memory it needs to run to completion.
• Space complexity can be defined as : Amount of
computer memory required during the program
execution, as the function of input size.
• The difference between space complexity and
time complexity is that the spacecan be reused.

More Related Content

What's hot

Applications of data structures
Applications of data structuresApplications of data structures
Applications of data structuresWipro
 
Elementary data structure
Elementary data structureElementary data structure
Elementary data structureBiswajit Mandal
 
Introduction to Data Structures & Algorithms
Introduction to Data Structures & AlgorithmsIntroduction to Data Structures & Algorithms
Introduction to Data Structures & AlgorithmsAfaq Mansoor Khan
 
Lecture 01 Intro to DSA
Lecture 01 Intro to DSALecture 01 Intro to DSA
Lecture 01 Intro to DSANurjahan Nipa
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using javaNarayan Sau
 
Introduction of data structure
Introduction of data structureIntroduction of data structure
Introduction of data structureeShikshak
 
ADS Introduction
ADS IntroductionADS Introduction
ADS IntroductionNagendraK18
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS Adams Sidibe
 
Algorithm analysis in fundamentals of data structure
Algorithm analysis in fundamentals of data structureAlgorithm analysis in fundamentals of data structure
Algorithm analysis in fundamentals of data structureVrushali Dhanokar
 
Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1Kumar
 
Data structures using C
Data structures using CData structures using C
Data structures using CPdr Patnaik
 
Data structure and algorithm All in One
Data structure and algorithm All in OneData structure and algorithm All in One
Data structure and algorithm All in Onejehan1987
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueGhaffar Khan
 
Introduction to data_structure
Introduction to data_structureIntroduction to data_structure
Introduction to data_structureAshim Lamichhane
 
Data structures and algorithm analysis in java
Data structures and algorithm analysis in javaData structures and algorithm analysis in java
Data structures and algorithm analysis in javaMuhammad Aleem Siddiqui
 
Dynamic Memory & Linked Lists
Dynamic Memory & Linked ListsDynamic Memory & Linked Lists
Dynamic Memory & Linked ListsAfaq Mansoor Khan
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureRai University
 
1. Data structures introduction
1. Data structures introduction1. Data structures introduction
1. Data structures introductionMandeep Singh
 

What's hot (20)

Applications of data structures
Applications of data structuresApplications of data structures
Applications of data structures
 
Elementary data structure
Elementary data structureElementary data structure
Elementary data structure
 
Introduction to Data Structures & Algorithms
Introduction to Data Structures & AlgorithmsIntroduction to Data Structures & Algorithms
Introduction to Data Structures & Algorithms
 
Lecture 01 Intro to DSA
Lecture 01 Intro to DSALecture 01 Intro to DSA
Lecture 01 Intro to DSA
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using java
 
Introduction of data structure
Introduction of data structureIntroduction of data structure
Introduction of data structure
 
ADS Introduction
ADS IntroductionADS Introduction
ADS Introduction
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
Algorithm analysis in fundamentals of data structure
Algorithm analysis in fundamentals of data structureAlgorithm analysis in fundamentals of data structure
Algorithm analysis in fundamentals of data structure
 
Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1
 
Data structures
Data structuresData structures
Data structures
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Data structures using C
Data structures using CData structures using C
Data structures using C
 
Data structure and algorithm All in One
Data structure and algorithm All in OneData structure and algorithm All in One
Data structure and algorithm All in One
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, Queue
 
Introduction to data_structure
Introduction to data_structureIntroduction to data_structure
Introduction to data_structure
 
Data structures and algorithm analysis in java
Data structures and algorithm analysis in javaData structures and algorithm analysis in java
Data structures and algorithm analysis in java
 
Dynamic Memory & Linked Lists
Dynamic Memory & Linked ListsDynamic Memory & Linked Lists
Dynamic Memory & Linked Lists
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structure
 
1. Data structures introduction
1. Data structures introduction1. Data structures introduction
1. Data structures introduction
 

Similar to ADT Types and Complexity Analysis in Under 40

Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfDukeCalvin
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsAkhil Kaushik
 
Unit 1, ADA.pptx
Unit 1, ADA.pptxUnit 1, ADA.pptx
Unit 1, ADA.pptxjinkhatima
 
Basic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - NotesBasic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - NotesOmprakash Chauhan
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxSyed Zaid Irshad
 
Basic concepts of data structures and algorithms
Basic concepts of data structures and algorithmsBasic concepts of data structures and algorithms
Basic concepts of data structures and algorithmsRosmina Joy Cabauatan
 
CH-1.2 Performance analysis for mca.pptx
CH-1.2 Performance analysis for mca.pptxCH-1.2 Performance analysis for mca.pptx
CH-1.2 Performance analysis for mca.pptxshivam7050174471
 
Software Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxSoftware Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxgauriVarshney8
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Dr. Pankaj Agarwal
 
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptxAlgorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptxRobertCarreonBula
 
Unit II_Searching and Sorting Algorithms.ppt
Unit II_Searching and Sorting Algorithms.pptUnit II_Searching and Sorting Algorithms.ppt
Unit II_Searching and Sorting Algorithms.pptHODElex
 
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...AntareepMajumder
 
Analysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptxAnalysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptxKarthikR780430
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdfNayanChandak1
 

Similar to ADT Types and Complexity Analysis in Under 40 (20)

Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdf
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
 
Unit 1, ADA.pptx
Unit 1, ADA.pptxUnit 1, ADA.pptx
Unit 1, ADA.pptx
 
Cs 331 Data Structures
Cs 331 Data StructuresCs 331 Data Structures
Cs 331 Data Structures
 
Basic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - NotesBasic of Data Structure - Data Structure - Notes
Basic of Data Structure - Data Structure - Notes
 
U nit i data structure-converted
U nit   i data structure-convertedU nit   i data structure-converted
U nit i data structure-converted
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Basic concepts of data structures and algorithms
Basic concepts of data structures and algorithmsBasic concepts of data structures and algorithms
Basic concepts of data structures and algorithms
 
Lec1.ppt
Lec1.pptLec1.ppt
Lec1.ppt
 
CH-1.2 Performance analysis for mca.pptx
CH-1.2 Performance analysis for mca.pptxCH-1.2 Performance analysis for mca.pptx
CH-1.2 Performance analysis for mca.pptx
 
Software Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxSoftware Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptx
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
 
data structure
data structuredata structure
data structure
 
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptxAlgorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
Algorithms-Flowcharts-Data-Types-and-Pseudocodes.pptx
 
Unit II_Searching and Sorting Algorithms.ppt
Unit II_Searching and Sorting Algorithms.pptUnit II_Searching and Sorting Algorithms.ppt
Unit II_Searching and Sorting Algorithms.ppt
 
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
 
Analysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptxAnalysis of Algorithms_RR.pptx
Analysis of Algorithms_RR.pptx
 
Data structure Unit-I Part A
Data structure Unit-I Part AData structure Unit-I Part A
Data structure Unit-I Part A
 
algo 1.ppt
algo 1.pptalgo 1.ppt
algo 1.ppt
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
 

More from LavanyaJ28

Cs1301 syllabus
Cs1301  syllabusCs1301  syllabus
Cs1301 syllabusLavanyaJ28
 
Ds important questions
Ds important questionsDs important questions
Ds important questionsLavanyaJ28
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using pythonLavanyaJ28
 
Searching,sorting
Searching,sortingSearching,sorting
Searching,sortingLavanyaJ28
 
Heap types & Trees
Heap types & TreesHeap types & Trees
Heap types & TreesLavanyaJ28
 
Unit ii linear data structures
Unit ii linear data structures Unit ii linear data structures
Unit ii linear data structures LavanyaJ28
 
Unit ii linear data structures
Unit ii linear data structures Unit ii linear data structures
Unit ii linear data structures LavanyaJ28
 
Unit 2 application of stack
Unit 2  application of stack Unit 2  application of stack
Unit 2 application of stack LavanyaJ28
 
Stack and queue
Stack and queueStack and queue
Stack and queueLavanyaJ28
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked listLavanyaJ28
 
Unit 1 Basic concepts to DS
Unit 1 Basic concepts to DSUnit 1 Basic concepts to DS
Unit 1 Basic concepts to DSLavanyaJ28
 
Unit 1 array based implementation
Unit 1  array based implementationUnit 1  array based implementation
Unit 1 array based implementationLavanyaJ28
 
Unit 1 polynomial manipulation
Unit 1   polynomial manipulationUnit 1   polynomial manipulation
Unit 1 polynomial manipulationLavanyaJ28
 

More from LavanyaJ28 (16)

Cs1301 syllabus
Cs1301  syllabusCs1301  syllabus
Cs1301 syllabus
 
Ds important questions
Ds important questionsDs important questions
Ds important questions
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using python
 
Searching,sorting
Searching,sortingSearching,sorting
Searching,sorting
 
Hashing
HashingHashing
Hashing
 
Graphs
GraphsGraphs
Graphs
 
Unit 3 trees
Unit 3   treesUnit 3   trees
Unit 3 trees
 
Heap types & Trees
Heap types & TreesHeap types & Trees
Heap types & Trees
 
Unit ii linear data structures
Unit ii linear data structures Unit ii linear data structures
Unit ii linear data structures
 
Unit ii linear data structures
Unit ii linear data structures Unit ii linear data structures
Unit ii linear data structures
 
Unit 2 application of stack
Unit 2  application of stack Unit 2  application of stack
Unit 2 application of stack
 
Stack and queue
Stack and queueStack and queue
Stack and queue
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked list
 
Unit 1 Basic concepts to DS
Unit 1 Basic concepts to DSUnit 1 Basic concepts to DS
Unit 1 Basic concepts to DS
 
Unit 1 array based implementation
Unit 1  array based implementationUnit 1  array based implementation
Unit 1 array based implementation
 
Unit 1 polynomial manipulation
Unit 1   polynomial manipulationUnit 1   polynomial manipulation
Unit 1 polynomial manipulation
 

Recently uploaded

VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 

Recently uploaded (20)

VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 

ADT Types and Complexity Analysis in Under 40

  • 2. INTRODUCTION • Data items are represented within a computer as a sequence of binary digits. • To distinguish between the different types of data, the term type is often used to refer to a collection of values and the term data type to refer to a given type along with a collection of operations for manipulating values of the given type.
  • 3. • The data types known as primitives come in two categories : simple and complex. • Simple data types :- values that are in the most basic forms and cannot be decomposed into smaller parts. Ex- Integer and real types. • Complex data types:- constructed of multiple components consisting of simple types or other complex types. In python objects, strings, list and dictionaries which can contain multiple values are all examples of complex types.
  • 4. ABSTRACTIONS • An Abstractions is a mechanism for separating the properties of an object and restricting the focus to those relevant in the current context. • The user of the abstractions does not have to understand all of the details in order to utilize the object, but only those relevant to the current task or problem.
  • 5. TYPES OF ABSTRACTION • 2 TYPES:- 1.Procedural abstraction – use of function or method knowing what it does but ignoring how it’s accomplished. 2. Data abstraction – separation of the properties of a data type from the implementation of that data type.
  • 6. ABSTRACT DATA TYPES • An abstract data type (or ADT) is a programmer defined data type that specifies a set of data values and a collection of well defined operations that can be performed on those values. • Abstract data types are defined independent of their implementation, allowing us to focus on the use of the new data type instead of how it’s implemented. • It is a type or class object which has its own behavior and properties.
  • 7. • Abstract data types can be viewed like black boxes as illustrated below
  • 8. • It is just a class defined in a standalone manner. The class has definitions of all the properties and functionalities defined in it. • Whenever the a data structure is required, the ADT file can be imported and objects of that class can be created and used directly. • Abstraction means just to show the users what they want and hide the unwanted technical details.
  • 9. • There are several advantages of working with abstract data types and focusing on the “what” instead of the “how.” – We can focus on solving the problem at hand instead of getting bogged down in the implementation details. – We can reduce logical errors that can occur from accidental misuse of storage structures and data types by preventing direct access to the implementation. – The implementation of the abstract data type can be changed without having to modify the program code that uses the ADT. – It’s easier to manage and divide larger programs into smaller modules, allowing different members of a team to work on the separate modules.
  • 10. Algorithmic Complexity • Algorithmic complexity is a very important topic in computer science. • Knowing the complexity of algorithms allows you to answer questions such as  How long will a program run on an input?  How much space will it take?  Is the problem solvable? • These are important bases of comparison between different algorithms. • An understanding of algorithmic complexity provides programmers with insight into the efficiency of their code. • Complexity is also important to several theoretical areas in computer science, including algorithms, data structures, and complexity theory
  • 11. COMPLEXITY • Any algorithm should have a way to measure it. • The standardized way of comparing algorithms is complexity. • All algorithms will have two complexities:- a. Time complexity- is the measure of running time of an algorithm. b. Space complexity – is the measure of total memory used by an algorithm.
  • 12. Average and Worst case Analysis • Worst-case complexity: The worst case complexity is the complexity of an algorithm when the input is the worst possible with respect to complexity. • Average complexity: The average complexity is the complexity of an algorithm that is averaged over all possible inputs ( assuming a uniform distribution over the inputs).
  • 13. Why Worst Case Analysis? Worst case running time : It is the longest running time for any input of size n. We usually concentrate on finding only the worst-case running time, that is, the longest running time for any input of size n, because of the following reasons: • The worst-case running time of an algorithm gives an upper bound on the running time for any input. Knowing it provides a guarantee that the algorithm will never take any longer. • For some algorithms, the worst case occurs fairly often. For example, in searching a database for a particular piece of information, the searching algorithm’s worst case will often occur when the information is not present in the database. The “average case” is often roughly as bad as the worst case.
  • 14. Asymptotic Analysis • Goal : to simplify the analysis of running time by getting rid of “details” which may be affected by specific implementation and hardware  like “rounding” : 1,000,001 = 1,000,000 • Capturing the essence : how the running time of an algorithm increases with the size of the input in the limit.  Asymptotically more efficient algorithms are best for all but small inputs.
  • 15. Time complexity • Running time may vary from one processor to another, based on their processing speed and memory. • Based on the internal resources availability , the running time of an algorithm may differ. • To overcome these difficulties, asymptotic notations were introduced. • Time complexity gives the total runtime of an algorithm. • Thus when a solution is designed, every module must be highly optimized for time complexity, in order to prevent wastage of computer resources.
  • 16. • The time complexity is the amount of time required by an algorithm to execute. • It is measured in terms of number of operations rather than computer time; because computer time is dependent on the hardware, processor, etc.. • Every single step of execution in a program will consume one unit time. • For universal standards, this unit is not assigned any metric and computation of all the steps is done at this basic time unit level. Some general order that we may consider O(c) < O(log n ) < O(n) < O(n log n) < O(nc) <O(cn) < O(n!) <O(nn), Where c is some constant.
  • 17. Space complexity • The space complexity of an algorithm is the amount of memory it needs to run to completion. • Space complexity can be defined as : Amount of computer memory required during the program execution, as the function of input size. • The difference between space complexity and time complexity is that the spacecan be reused.

Editor's Notes

  1. Page 22