SlideShare a Scribd company logo
1 of 35
Data Structures: A Pseudocode Approach with C, Second Edition 1
Chapter 1
Objectives
• Use pseudocode in the development of algorithms
• Understand the need for Abstract Data Type (ADT)
• Understand the implementation of ADTs
• Use void pointers and pointer to functions
• Understand the role of Big-O notation
Basic Concepts
Data Structures: A Pseudocode Approach with C, Second Edition 2
Pseudocode
Pseudocode is an English-like representation of the algorithm logic. It
consists of an extended version of the basic algorithmic constructs:
sequence, selection, and iteration.
•Algorithm Header
•Purpose, Condition, and Return
•Statement Numbers
•Variables
•Statment Constructs
•Algorithm Analysis
Data Structures: A Pseudocode Approach with C, Second Edition 3
Data Structures: A Pseudocode Approach with C, Second Edition 4
Data Structures: A Pseudocode Approach with C, Second Edition 5
The Abstract Data Type
An ADT consists of a data declaration packaged
together with the operations that are meaningful
on the data while embodying the structured
principles of encapsulation and data hiding. In this section
we define the basic parts of an ADT.
•Atomic and Composite Data
•Data Type
•Data Structure
•Abstract Data Type
Data Structures: A Pseudocode Approach with C, Second Edition 6
Data Structures: A Pseudocode Approach with C, Second Edition 7
Data Structure
Aggregation of atomic and composite data into a set with defined
relationships. Structure refers to a set of rules that hold the data
together.
• A combination of elements in which each is either a data type or another
data structure.
• A set of associations of relationship involving combined elements.
Example:
Data Structures: A Pseudocode Approach with C, Second Edition 8
Data Structures: A Pseudocode Approach with C, Second Edition 9
Abstract Data Type
 ADT users are NOT concerned with how the task is done but rather what it
can do.
 An abstract data type is a data declaration packaged together with the
operations that are meaningful for the data type.
 We encapsulate the data and the operations on the data, and then hide
them from the user.
 All references to and manipulation of the data in a data structure are
handled through defined interfaces to the structure.
Data Structures: A Pseudocode Approach with C, Second Edition 10
Model for an Abstract Data Type
In this section we provide a conceptual
model for an Abstract Data Type (ADT).
• ADT Operation – passage like
• ADT Data Structure – controlled
entirely
Data Structures: A Pseudocode Approach with C, Second Edition 11
Data Structures: A Pseudocode Approach with C, Second Edition 12
ADT Implementations
There are two basic structures we can use to
implement an ADT list: arrays and linked lists.
In this section we discuss the basic
linked-list implementation.
• Array Implementation
• Linked List Implemenation
Data Structures: A Pseudocode Approach with C, Second Edition 13
Data Structures: A Pseudocode Approach with C, Second Edition 14
Data Structures: A Pseudocode Approach with C, Second Edition 15
Data Structures: A Pseudocode Approach with C, Second Edition 16
Generic Code for ADT
In this section we discuss and provide examples
of two C tools that are required to implement
an ADT.
• Pointer to Void
• Pointer to Function
Data Structures: A Pseudocode Approach with C, Second Edition 17
Data Structures: A Pseudocode Approach with C, Second Edition 18
Data Structures: A Pseudocode Approach with C, Second Edition 19
Data Structures: A Pseudocode Approach with C, Second Edition 20
Data Structures: A Pseudocode Approach with C, Second Edition 21
(Continued)
Data Structures: A Pseudocode Approach with C, Second Edition 22
Data Structures: A Pseudocode Approach with C, Second Edition 23
Data Structures: A Pseudocode Approach with C, Second Edition 24
Data Structures: A Pseudocode Approach with C, Second Edition 25
Data Structures: A Pseudocode Approach with C, Second Edition 26
(Continued)
Data Structures: A Pseudocode Approach with C, Second Edition 27
Data Structures: A Pseudocode Approach with C, Second Edition 28
Data Structures: A Pseudocode Approach with C, Second Edition 29
Data Structures: A Pseudocode Approach with C, Second Edition 30
Data Structures: A Pseudocode Approach with C, Second Edition 31
Data Structures: A Pseudocode Approach with C, Second Edition 32
Data Structures: A Pseudocode Approach with C, Second Edition 33
Data Structures: A Pseudocode Approach with C, Second Edition 34
Data Structures: A Pseudocode Approach with C, Second Edition 35
Algorithm Efficiency
To design and implement algorithms, programmers
must have a basic understanding of what constitutes
good, efficient algorithms.
Linear Loops
-Efficiency is a function of the number of intstructions.
- Loop update either adds or subtracts.
• Logarithmic Loops
-The controlling variable is either multiplied or divided in each iteration.
- The number of iteration is a function of the multiplier or divisor.
• Nested Loops
- The number of iterations is the total number which is the product of the number of
iterations in the inner loop and number of iterations in the outer loop.
• Big-O Notation
-Not concerned with exact measurement of efficiency but with the magnitude.
- A dominant factor determines the magnitute.

More Related Content

Similar to Basic.ppt

Csc1100 lecture01 ch01 pt2-paradigm (1)
Csc1100 lecture01 ch01 pt2-paradigm (1)Csc1100 lecture01 ch01 pt2-paradigm (1)
Csc1100 lecture01 ch01 pt2-paradigm (1)IIUM
 
Csc1100 lecture01 ch01 pt2-paradigm
Csc1100 lecture01 ch01 pt2-paradigmCsc1100 lecture01 ch01 pt2-paradigm
Csc1100 lecture01 ch01 pt2-paradigmIIUM
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.pptVamshi171
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.ppthamsa72
 
Software Engineering Question Bank.docx
Software Engineering Question Bank.docxSoftware Engineering Question Bank.docx
Software Engineering Question Bank.docxkarthikaparthasarath
 
HRM with optimized functional implementation of National Data Center reducing...
HRM with optimized functional implementation of National Data Center reducing...HRM with optimized functional implementation of National Data Center reducing...
HRM with optimized functional implementation of National Data Center reducing...Ashfaque Ahmed
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2RajSingh734307
 

Similar to Basic.ppt (20)

Csc1100 lecture01 ch01 pt2-paradigm (1)
Csc1100 lecture01 ch01 pt2-paradigm (1)Csc1100 lecture01 ch01 pt2-paradigm (1)
Csc1100 lecture01 ch01 pt2-paradigm (1)
 
Csc1100 lecture01 ch01 pt2-paradigm
Csc1100 lecture01 ch01 pt2-paradigmCsc1100 lecture01 ch01 pt2-paradigm
Csc1100 lecture01 ch01 pt2-paradigm
 
Chap-02-01.ppt
Chap-02-01.pptChap-02-01.ppt
Chap-02-01.ppt
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.ppt
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.ppt
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.ppt
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.ppt
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.ppt
 
Chap 02-1
Chap 02-1Chap 02-1
Chap 02-1
 
C programming-1.pptx
C programming-1.pptxC programming-1.pptx
C programming-1.pptx
 
2. visualization in data mining
2. visualization in data mining2. visualization in data mining
2. visualization in data mining
 
Software Engineering Question Bank.docx
Software Engineering Question Bank.docxSoftware Engineering Question Bank.docx
Software Engineering Question Bank.docx
 
Lec1
Lec1Lec1
Lec1
 
An Introduction to CCDH
An Introduction to CCDHAn Introduction to CCDH
An Introduction to CCDH
 
Designmethodology1
Designmethodology1Designmethodology1
Designmethodology1
 
HRM with optimized functional implementation of National Data Center reducing...
HRM with optimized functional implementation of National Data Center reducing...HRM with optimized functional implementation of National Data Center reducing...
HRM with optimized functional implementation of National Data Center reducing...
 
Chap-02-1.ppt
Chap-02-1.pptChap-02-1.ppt
Chap-02-1.ppt
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2
 
Chapter 02-02.pptx
Chapter 02-02.pptxChapter 02-02.pptx
Chapter 02-02.pptx
 
What is C3D?
What is C3D?What is C3D?
What is C3D?
 

Recently uploaded

Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
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
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 

Recently uploaded (20)

Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
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...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 

Basic.ppt

  • 1. Data Structures: A Pseudocode Approach with C, Second Edition 1 Chapter 1 Objectives • Use pseudocode in the development of algorithms • Understand the need for Abstract Data Type (ADT) • Understand the implementation of ADTs • Use void pointers and pointer to functions • Understand the role of Big-O notation Basic Concepts
  • 2. Data Structures: A Pseudocode Approach with C, Second Edition 2 Pseudocode Pseudocode is an English-like representation of the algorithm logic. It consists of an extended version of the basic algorithmic constructs: sequence, selection, and iteration. •Algorithm Header •Purpose, Condition, and Return •Statement Numbers •Variables •Statment Constructs •Algorithm Analysis
  • 3. Data Structures: A Pseudocode Approach with C, Second Edition 3
  • 4. Data Structures: A Pseudocode Approach with C, Second Edition 4
  • 5. Data Structures: A Pseudocode Approach with C, Second Edition 5 The Abstract Data Type An ADT consists of a data declaration packaged together with the operations that are meaningful on the data while embodying the structured principles of encapsulation and data hiding. In this section we define the basic parts of an ADT. •Atomic and Composite Data •Data Type •Data Structure •Abstract Data Type
  • 6. Data Structures: A Pseudocode Approach with C, Second Edition 6
  • 7. Data Structures: A Pseudocode Approach with C, Second Edition 7 Data Structure Aggregation of atomic and composite data into a set with defined relationships. Structure refers to a set of rules that hold the data together. • A combination of elements in which each is either a data type or another data structure. • A set of associations of relationship involving combined elements. Example:
  • 8. Data Structures: A Pseudocode Approach with C, Second Edition 8
  • 9. Data Structures: A Pseudocode Approach with C, Second Edition 9 Abstract Data Type  ADT users are NOT concerned with how the task is done but rather what it can do.  An abstract data type is a data declaration packaged together with the operations that are meaningful for the data type.  We encapsulate the data and the operations on the data, and then hide them from the user.  All references to and manipulation of the data in a data structure are handled through defined interfaces to the structure.
  • 10. Data Structures: A Pseudocode Approach with C, Second Edition 10 Model for an Abstract Data Type In this section we provide a conceptual model for an Abstract Data Type (ADT). • ADT Operation – passage like • ADT Data Structure – controlled entirely
  • 11. Data Structures: A Pseudocode Approach with C, Second Edition 11
  • 12. Data Structures: A Pseudocode Approach with C, Second Edition 12 ADT Implementations There are two basic structures we can use to implement an ADT list: arrays and linked lists. In this section we discuss the basic linked-list implementation. • Array Implementation • Linked List Implemenation
  • 13. Data Structures: A Pseudocode Approach with C, Second Edition 13
  • 14. Data Structures: A Pseudocode Approach with C, Second Edition 14
  • 15. Data Structures: A Pseudocode Approach with C, Second Edition 15
  • 16. Data Structures: A Pseudocode Approach with C, Second Edition 16 Generic Code for ADT In this section we discuss and provide examples of two C tools that are required to implement an ADT. • Pointer to Void • Pointer to Function
  • 17. Data Structures: A Pseudocode Approach with C, Second Edition 17
  • 18. Data Structures: A Pseudocode Approach with C, Second Edition 18
  • 19. Data Structures: A Pseudocode Approach with C, Second Edition 19
  • 20. Data Structures: A Pseudocode Approach with C, Second Edition 20
  • 21. Data Structures: A Pseudocode Approach with C, Second Edition 21 (Continued)
  • 22. Data Structures: A Pseudocode Approach with C, Second Edition 22
  • 23. Data Structures: A Pseudocode Approach with C, Second Edition 23
  • 24. Data Structures: A Pseudocode Approach with C, Second Edition 24
  • 25. Data Structures: A Pseudocode Approach with C, Second Edition 25
  • 26. Data Structures: A Pseudocode Approach with C, Second Edition 26 (Continued)
  • 27. Data Structures: A Pseudocode Approach with C, Second Edition 27
  • 28. Data Structures: A Pseudocode Approach with C, Second Edition 28
  • 29. Data Structures: A Pseudocode Approach with C, Second Edition 29
  • 30. Data Structures: A Pseudocode Approach with C, Second Edition 30
  • 31. Data Structures: A Pseudocode Approach with C, Second Edition 31
  • 32. Data Structures: A Pseudocode Approach with C, Second Edition 32
  • 33. Data Structures: A Pseudocode Approach with C, Second Edition 33
  • 34. Data Structures: A Pseudocode Approach with C, Second Edition 34
  • 35. Data Structures: A Pseudocode Approach with C, Second Edition 35 Algorithm Efficiency To design and implement algorithms, programmers must have a basic understanding of what constitutes good, efficient algorithms. Linear Loops -Efficiency is a function of the number of intstructions. - Loop update either adds or subtracts. • Logarithmic Loops -The controlling variable is either multiplied or divided in each iteration. - The number of iteration is a function of the multiplier or divisor. • Nested Loops - The number of iterations is the total number which is the product of the number of iterations in the inner loop and number of iterations in the outer loop. • Big-O Notation -Not concerned with exact measurement of efficiency but with the magnitude. - A dominant factor determines the magnitute.