SlideShare a Scribd company logo
1 of 17
BASICS OF DATA STRUCTURE
PRESENTED BY
Ms. V.VENNILA., MCA.,M.Phil.,
Asst.Prof of Information Technology,
Bon Secours College for Women,
Thanjavur
What is Program
 A Set of Instructions
 Data Structures + Algorithms
 Data Structure = A Container stores Data
 Algoirthm = Logic + Control
Functions of Data Structures
 Add
 Index
 Key
 Position
 Priority
 Get
 Change
 Delete
Common Data Structures
 Array
 Stack
 Queue
 Linked List
 Tree
 Heap
 Hash Table
 Priority Queue
Algorithm Strategies
 Greedy
 Divide and Conquer
 Dynamic Programming
 Exhaustive Search
Chapter 1 Basic Concepts
 Overview: System Life Cycle
 Algorithm Specification
 Data Abstraction
 Performance Analysis
 Performance Measurement
1.1 Overview
 We consider this cycle as consisting of
five phases.
 Requirements
 Analysis: bottom-up vs. top-down
 Design: data objects and operations
 Refinement and Coding
 Verification
 Program Proving
 Testing
 Debugging
1.2 Algorithm Specification
 1.2.1 Introduction
 An algorithm is a finite set of instructions that
accomplishes a particular task.
 Criteria
 input: zero or more quantities that are externally supplied
 output: at least one quantity is produced
 definiteness: clear and unambiguous
 finiteness: terminate after a finite number of steps
 effectiveness: instruction is basic enough to be carried out
 A program does not have to satisfy the finiteness criteria.
1.2 Algorithm Specification (2/10)
 Representation
 A natural language, like English or Chinese.
 A graphic, like flowcharts.
 A computer language, like C.
 Algorithms + Data structures =
Programs [Niklus Wirth]
 Sequential search vs. Binary search
 Example 1.1 [Selection sort]:
 From those integers that are currently unsorted, find the
smallest and place it next in the sorted list.
i [0] [1] [2] [3] [4]
- 30 10 50 40 20
0 10 30 50 40 20
1 10 20 40 50 30
2 10 20 30 40 50
3 10 20 30 40 50
1.2 Algorithm Specification
1.3 Data abstraction
 Data Type
A data type is a collection of objects and a set of
operations that act on those objects.
 For example, the data type int consists of the objects {0,
+1, -1, +2, -2, …, INT_MAX, INT_MIN} and the operations
+, -, *, /, and %.
 The data types of C
 The basic data types: char, int, float and double
 The group data types: array and struct
 The pointer data type
 The user-defined types
1.4 Performance analysis
 Criteria
 Is it correct?
 Is it readable?
 …
 Performance Analysis (machine independent)
 space complexity: storage requirement
 time complexity: computing time
 Performance Measurement (machine dependent)
1.4 Performance analysis
 1.4.1 Space Complexity:
S(P)=C+SP(I)
 Fixed Space Requirements (C)
Independent of the characteristics
of the inputs and outputs
 instruction space
 space for simple variables, fixed-size structured
variable, constants
 Variable Space Requirements (SP(I))
depend on the instance characteristic I
 number, size, values of inputs and outputs
associated with I
 recursive stack space, formal parameters, local
variables, return address
1.5 Performance measurement
 Although performance analysis gives us a powerful
tool for assessing an algorithm’s space and time
complexity, at some point we also must consider
how the algorithm executes on our machine.
 This consideration moves us from the realm of analysis
to that of measurement.
1.5 Performance measurement
 Example 1.22
[Worst case performance of the selection
function]:
 The tests were conducted on an IBM compatible PC with
an 80386 cpu, an 80387 numeric coprocessor, and a
turbo accelerator. We use Broland’s Turbo C compiler.
1.5 Performance measurement
THANK YOU

More Related Content

What's hot

Top down and botttom up Parsing
Top down     and botttom up ParsingTop down     and botttom up Parsing
Top down and botttom up ParsingGerwin Ocsena
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaArrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaEdureka!
 
Managing I/O operations In C- Language
Managing I/O operations In C- LanguageManaging I/O operations In C- Language
Managing I/O operations In C- LanguageRavindraSalunke3
 
Python - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning LibrariesPython - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning LibrariesAndrew Ferlitsch
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programmingMukesh Tekwani
 
arrays and pointers
arrays and pointersarrays and pointers
arrays and pointersSamiksha Pun
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide shareDevashish Kumar
 
03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdfKkSingh64
 
What is Link list? explained with animations
What is Link list? explained with animationsWhat is Link list? explained with animations
What is Link list? explained with animationsPratikNaik41
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C LanguageRAJWANT KAUR
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Ashish Duggal
 

What's hot (20)

NLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit DistanceNLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit Distance
 
Top down and botttom up Parsing
Top down     and botttom up ParsingTop down     and botttom up Parsing
Top down and botttom up Parsing
 
Pointers C programming
Pointers  C programmingPointers  C programming
Pointers C programming
 
Python dictionary
Python   dictionaryPython   dictionary
Python dictionary
 
Array ppt
Array pptArray ppt
Array ppt
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaArrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | Edureka
 
Managing I/O operations In C- Language
Managing I/O operations In C- LanguageManaging I/O operations In C- Language
Managing I/O operations In C- Language
 
Functions in C
Functions in CFunctions in C
Functions in C
 
Python - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning LibrariesPython - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning Libraries
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 
Insertion Sorting
Insertion SortingInsertion Sorting
Insertion Sorting
 
Ai lab manual
Ai lab manualAi lab manual
Ai lab manual
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
arrays and pointers
arrays and pointersarrays and pointers
arrays and pointers
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
 
03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf03 Linear Arrays Memory Representations .pdf
03 Linear Arrays Memory Representations .pdf
 
What is Link list? explained with animations
What is Link list? explained with animationsWhat is Link list? explained with animations
What is Link list? explained with animations
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
NUMPY
NUMPY NUMPY
NUMPY
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
 

Similar to BASICS OF DATA STRUCTURE

Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Data Structure
Data StructureData Structure
Data Structuresheraz1
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Introduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptxIntroduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptxesuEthopi
 
Data Structures unit I Introduction - data types
Data Structures unit I Introduction - data typesData Structures unit I Introduction - data types
Data Structures unit I Introduction - data typesAmirthaVarshini80
 
Intrusion Detection System Based on K-Star Classifier and Feature Set Reduction
Intrusion Detection System Based on K-Star Classifier and Feature Set ReductionIntrusion Detection System Based on K-Star Classifier and Feature Set Reduction
Intrusion Detection System Based on K-Star Classifier and Feature Set ReductionIOSR Journals
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...DrkhanchanaR
 
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
 
Bca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureBca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureRai University
 
19. Java data structures algorithms and complexity
19. Java data structures algorithms and complexity19. Java data structures algorithms and complexity
19. Java data structures algorithms and complexityIntro C# Book
 
Introduction to Data structure and algorithm.pptx
Introduction to Data structure and algorithm.pptxIntroduction to Data structure and algorithm.pptx
Introduction to Data structure and algorithm.pptxline24arts
 
Data structures using C
Data structures using CData structures using C
Data structures using CPdr Patnaik
 
Ds12 140715025807-phpapp02
Ds12 140715025807-phpapp02Ds12 140715025807-phpapp02
Ds12 140715025807-phpapp02Salman Qamar
 
Bsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structureBsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structureRai University
 

Similar to BASICS OF DATA STRUCTURE (20)

Chapter 1- IT.pptx
Chapter 1- IT.pptxChapter 1- IT.pptx
Chapter 1- IT.pptx
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Data Structure
Data StructureData Structure
Data Structure
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Week 1 - Data Structures and Algorithms
Week 1 - Data Structures and AlgorithmsWeek 1 - Data Structures and Algorithms
Week 1 - Data Structures and Algorithms
 
Introduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptxIntroduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptx
 
Lecture 1 and 2
Lecture 1 and 2Lecture 1 and 2
Lecture 1 and 2
 
Data Structures unit I Introduction - data types
Data Structures unit I Introduction - data typesData Structures unit I Introduction - data types
Data Structures unit I Introduction - data types
 
Intrusion Detection System Based on K-Star Classifier and Feature Set Reduction
Intrusion Detection System Based on K-Star Classifier and Feature Set ReductionIntrusion Detection System Based on K-Star Classifier and Feature Set Reduction
Intrusion Detection System Based on K-Star Classifier and Feature Set Reduction
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
 
Lect1.pptx
Lect1.pptxLect1.pptx
Lect1.pptx
 
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
 
Bca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureBca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structure
 
Data structure using c++
Data structure using c++Data structure using c++
Data structure using c++
 
19. Java data structures algorithms and complexity
19. Java data structures algorithms and complexity19. Java data structures algorithms and complexity
19. Java data structures algorithms and complexity
 
Introduction to Data structure and algorithm.pptx
Introduction to Data structure and algorithm.pptxIntroduction to Data structure and algorithm.pptx
Introduction to Data structure and algorithm.pptx
 
Data structures using C
Data structures using CData structures using C
Data structures using C
 
Ds12 140715025807-phpapp02
Ds12 140715025807-phpapp02Ds12 140715025807-phpapp02
Ds12 140715025807-phpapp02
 
Bsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structureBsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structure
 
8.unit-1-fds-2022-23.pptx
8.unit-1-fds-2022-23.pptx8.unit-1-fds-2022-23.pptx
8.unit-1-fds-2022-23.pptx
 

More from VENNILAV6

WORKING WITH GRAPHICS
WORKING WITH GRAPHICSWORKING WITH GRAPHICS
WORKING WITH GRAPHICSVENNILAV6
 
CREATING A MASTER PAGE
CREATING A MASTER PAGECREATING A MASTER PAGE
CREATING A MASTER PAGEVENNILAV6
 
CREATING A NEW PUBLICATION IN PAGEMAKER
CREATING A NEW PUBLICATION IN PAGEMAKERCREATING A NEW PUBLICATION IN PAGEMAKER
CREATING A NEW PUBLICATION IN PAGEMAKERVENNILAV6
 
Relational algebra
Relational algebraRelational algebra
Relational algebraVENNILAV6
 
Joins & constraints
Joins & constraintsJoins & constraints
Joins & constraintsVENNILAV6
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESVENNILAV6
 
Database architecture
Database architectureDatabase architecture
Database architectureVENNILAV6
 
Data definition language
Data definition languageData definition language
Data definition languageVENNILAV6
 
INTERCONNECTION STRUCTURE
INTERCONNECTION STRUCTUREINTERCONNECTION STRUCTURE
INTERCONNECTION STRUCTUREVENNILAV6
 
CACHE MEMORY
CACHE MEMORYCACHE MEMORY
CACHE MEMORYVENNILAV6
 
Machine control flow
Machine control flowMachine control flow
Machine control flowVENNILAV6
 
COMPUTER FUNCTIONS
COMPUTER FUNCTIONSCOMPUTER FUNCTIONS
COMPUTER FUNCTIONSVENNILAV6
 
EXTERNAL DEVICE
EXTERNAL DEVICEEXTERNAL DEVICE
EXTERNAL DEVICEVENNILAV6
 
CORELDRAW EXAMPLES
CORELDRAW EXAMPLESCORELDRAW EXAMPLES
CORELDRAW EXAMPLESVENNILAV6
 
object oriented system development
object oriented system development object oriented system development
object oriented system development VENNILAV6
 
virtual function
virtual functionvirtual function
virtual functionVENNILAV6
 
constructor and destructor
constructor and destructorconstructor and destructor
constructor and destructorVENNILAV6
 
BASICS OF MOBILE COMPUTING
BASICS OF MOBILE COMPUTINGBASICS OF MOBILE COMPUTING
BASICS OF MOBILE COMPUTINGVENNILAV6
 
BASICS OF JAVA
BASICS OF JAVABASICS OF JAVA
BASICS OF JAVAVENNILAV6
 

More from VENNILAV6 (20)

WORKING WITH GRAPHICS
WORKING WITH GRAPHICSWORKING WITH GRAPHICS
WORKING WITH GRAPHICS
 
CREATING A MASTER PAGE
CREATING A MASTER PAGECREATING A MASTER PAGE
CREATING A MASTER PAGE
 
CREATING A NEW PUBLICATION IN PAGEMAKER
CREATING A NEW PUBLICATION IN PAGEMAKERCREATING A NEW PUBLICATION IN PAGEMAKER
CREATING A NEW PUBLICATION IN PAGEMAKER
 
Relational algebra
Relational algebraRelational algebra
Relational algebra
 
Joins & constraints
Joins & constraintsJoins & constraints
Joins & constraints
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIES
 
Database architecture
Database architectureDatabase architecture
Database architecture
 
Data definition language
Data definition languageData definition language
Data definition language
 
INTERCONNECTION STRUCTURE
INTERCONNECTION STRUCTUREINTERCONNECTION STRUCTURE
INTERCONNECTION STRUCTURE
 
CACHE MEMORY
CACHE MEMORYCACHE MEMORY
CACHE MEMORY
 
Machine control flow
Machine control flowMachine control flow
Machine control flow
 
COMPUTER FUNCTIONS
COMPUTER FUNCTIONSCOMPUTER FUNCTIONS
COMPUTER FUNCTIONS
 
EXTERNAL DEVICE
EXTERNAL DEVICEEXTERNAL DEVICE
EXTERNAL DEVICE
 
CORELDRAW EXAMPLES
CORELDRAW EXAMPLESCORELDRAW EXAMPLES
CORELDRAW EXAMPLES
 
object oriented system development
object oriented system development object oriented system development
object oriented system development
 
virtual function
virtual functionvirtual function
virtual function
 
constructor and destructor
constructor and destructorconstructor and destructor
constructor and destructor
 
INHERITANCE
INHERITANCEINHERITANCE
INHERITANCE
 
BASICS OF MOBILE COMPUTING
BASICS OF MOBILE COMPUTINGBASICS OF MOBILE COMPUTING
BASICS OF MOBILE COMPUTING
 
BASICS OF JAVA
BASICS OF JAVABASICS OF JAVA
BASICS OF JAVA
 

Recently uploaded

Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

BASICS OF DATA STRUCTURE

  • 1. BASICS OF DATA STRUCTURE PRESENTED BY Ms. V.VENNILA., MCA.,M.Phil., Asst.Prof of Information Technology, Bon Secours College for Women, Thanjavur
  • 2. What is Program  A Set of Instructions  Data Structures + Algorithms  Data Structure = A Container stores Data  Algoirthm = Logic + Control
  • 3. Functions of Data Structures  Add  Index  Key  Position  Priority  Get  Change  Delete
  • 4. Common Data Structures  Array  Stack  Queue  Linked List  Tree  Heap  Hash Table  Priority Queue
  • 5. Algorithm Strategies  Greedy  Divide and Conquer  Dynamic Programming  Exhaustive Search
  • 6. Chapter 1 Basic Concepts  Overview: System Life Cycle  Algorithm Specification  Data Abstraction  Performance Analysis  Performance Measurement
  • 7. 1.1 Overview  We consider this cycle as consisting of five phases.  Requirements  Analysis: bottom-up vs. top-down  Design: data objects and operations  Refinement and Coding  Verification  Program Proving  Testing  Debugging
  • 8. 1.2 Algorithm Specification  1.2.1 Introduction  An algorithm is a finite set of instructions that accomplishes a particular task.  Criteria  input: zero or more quantities that are externally supplied  output: at least one quantity is produced  definiteness: clear and unambiguous  finiteness: terminate after a finite number of steps  effectiveness: instruction is basic enough to be carried out  A program does not have to satisfy the finiteness criteria.
  • 9. 1.2 Algorithm Specification (2/10)  Representation  A natural language, like English or Chinese.  A graphic, like flowcharts.  A computer language, like C.  Algorithms + Data structures = Programs [Niklus Wirth]  Sequential search vs. Binary search
  • 10.  Example 1.1 [Selection sort]:  From those integers that are currently unsorted, find the smallest and place it next in the sorted list. i [0] [1] [2] [3] [4] - 30 10 50 40 20 0 10 30 50 40 20 1 10 20 40 50 30 2 10 20 30 40 50 3 10 20 30 40 50 1.2 Algorithm Specification
  • 11. 1.3 Data abstraction  Data Type A data type is a collection of objects and a set of operations that act on those objects.  For example, the data type int consists of the objects {0, +1, -1, +2, -2, …, INT_MAX, INT_MIN} and the operations +, -, *, /, and %.  The data types of C  The basic data types: char, int, float and double  The group data types: array and struct  The pointer data type  The user-defined types
  • 12. 1.4 Performance analysis  Criteria  Is it correct?  Is it readable?  …  Performance Analysis (machine independent)  space complexity: storage requirement  time complexity: computing time  Performance Measurement (machine dependent)
  • 13. 1.4 Performance analysis  1.4.1 Space Complexity: S(P)=C+SP(I)  Fixed Space Requirements (C) Independent of the characteristics of the inputs and outputs  instruction space  space for simple variables, fixed-size structured variable, constants  Variable Space Requirements (SP(I)) depend on the instance characteristic I  number, size, values of inputs and outputs associated with I  recursive stack space, formal parameters, local variables, return address
  • 14. 1.5 Performance measurement  Although performance analysis gives us a powerful tool for assessing an algorithm’s space and time complexity, at some point we also must consider how the algorithm executes on our machine.  This consideration moves us from the realm of analysis to that of measurement.
  • 15. 1.5 Performance measurement  Example 1.22 [Worst case performance of the selection function]:  The tests were conducted on an IBM compatible PC with an 80386 cpu, an 80387 numeric coprocessor, and a turbo accelerator. We use Broland’s Turbo C compiler.