SlideShare a Scribd company logo
DATA STRUCTURE
Unit – I Part A
Syllabus:
• Introduction:
• Pseudo code
• Algorithm Header
• Purpose, Conditions, Return
• Statement Numbers
• Variables
• Algorithm Analysis
• Statement Constructs
• Pseudo Example
• The Abstract Data Type
• Atomic and Composite Data
• Data Structure
• Abstract Data Type
• A model for an Abstract Data Type
• ADT Operations
• ADT Data Structure
• ADT Class Templates
• Algorithm Efficiency
• Linear Loops
• Logarithmic Loops
• Nested Loops
• Big-O Notation
• Standard Measures of Efficiency
• Big-O Analysis Examples
• Searching:
• List Searches
• Sequential Search
• Sequential Search Algorithm
• Variations on Sequential
• Searches
• Sentinel Search
• Probability Search
• Ordered List Search
• Binary Search
• Target Found
• Target Not Found
• Binary Search Algorithm
• Binary Search Algorithms
• Analyzing Search Algorithms
• Sequential Search
• Binary Search
• Hashed List Searches
• Basic Concepts
• Hashing Methods
• Direct Method
• Subtraction Method
• Modulo-division Method
• Digit-extraction Method
• Midsquare Method
• Folding Methods
• Rotation Method
• Pseudorandom Hashing
• One Hashing Algorithm
• Collision Resolution
• Open Addressing
• Linear Probe
• Quadratic Probe Pseudorandom Collision
• Resolution
• Key Offset
• Linked List Resolution
• Bucket Hashing
• Combination Approaches
• Hash List Example
Pseudo Code:
• Several tools are used to define algorithms, one of the
most common is pseudo code.
• It is an English like representation of the code required for
an algorithm.
• It provides a related syntax that is easy to read.
Pseudo code
• It is a compact and informal high-level description
program.
• {
• pseudo = imitation or false,
• code = instruct written in program language
• }
• It is used for planning a program
• It is also called as Program Design Language (PDL).
• Logical Structure of Pseudo code:
• Sequence logic
• Selection logic
• Iteration logic
• One of the most common tools for defining
algorithms is pseudo code, which is part English, part
structured code.
• This data definition describes a node in a self-
referential linked list that consists of a nested
structure (data) and a pointer to the next node (link).
Algorithm:
Data structure Unit-I Part A
Data structure Unit-I Part A
Data structure Unit-I Part A
Algorithm Header:
• Each algorithm begins with a header that names it,
describes its parameters, and lists any pre and post
conditions.
• Important because the programmer using the algorithm
often sees only the header information, not the complete
algorithm.
Data structure Unit-I Part A
Purpose:
• It is a short statement about what the algorithms does.
• It needs to describe only the general algorithms
processing.
• It should not attempt to describe all of the processing.
Conditions:
• Precondition:
• It lists any precursor requirements for the parameters.
• Postcondition:
• It identifies any action taken and the status of any output
parameters.
Return:
• If a value is returned, it will be identified by a return
condition.
• Often there is none, and no return condition is needed.
Statements Numbers:
• They are numbered using an abbreviated decimal
notation in which only the last of the number sequence.
• It is shown on each statement.
• End/Exit conditions:
• The end of the selection is indicated by the end.
• The end of the loop is indicated by end statement/loop.
Variables:
• It is not necessary to define every variable used in the
algorithm, especially when the context of the data is
indicated by its name.
• The selection of the name for an algorithm or variable
goes a long way toward making the algorithm and its
coded implementation more readable.
Rules:
Don’t use single character names.
• Example:
• Variable i and j use in C++ for loops.
• There is always a better name.
Don’t use generic names.
• Example:
• Generic names are count, sum, total, row, column and file.
Abbreviations aren’t excluded as intelligent data names.
• Example:
• stuCnt is good abbreviation for studentCount.
Algorithm Analysis:
• Not every line of code is explained.
• Rather, the analysis examines only those points that
either need to be emphasized or that may require some
clarification.
• It also often introduces style or efficiency considerations.
Statement Constructs:
• Niklaus Wirth stated that any algorithm could be written
with only three programming constructs: sequence,
selection and loop.
• Our pseudo code contains only these three basic
constructs.
Sequence Statements:
• It is a series of statements that don’t alter the execution
path within an algorithm.
• It is obvious that statements such as assign and add are
sequence statements.
• It is lies in the structured programming concept.
• When an algorithm completes, it returns to the statement
immediately after the call that invoked it.
Selection Statements:
• It evaluate one or more alternatives.
• If the alternatives are true, one path is taken.
• If the alternatives are false, a different path is taken.
• The typical selection statement is the two-way selection
Data structure Unit-I Part A
Loop Statement:
• It iterates a block of code.
• The loop that we use in our pseudo code most closely
resembles the while loop.
Data structure Unit-I Part A
Pseudocode Example:
• Algorithm deviation
• Pre nothing
• Post average and numbers with their deviation
printed
• 1 i = 0
• 2 loop (not end of file)
• 1 read number into array[i]
• 2 sum = sum + number
• 3 I = i+1
• 3 end loop
• 4 average = sum / i
• 5 print (average)
• 6 j = 0
• 7 loop (j < i)
• 1 devFromAve = array[j] – average
• 2 print (array[j], devFromAve)
• 3 j = j +1
• 8 end loop
• 9 return
• end deviation
The Abstract Data Type:
• We started with non-structured, linear programs, known as
spaghetti code.
• In which the logic flow wound through the program like
spaghetti on a plate.
• The concept of modular programming, in which programs were
organized in functions, each of which still used a linear coding
techniques.
• Data Type:
• A set of data
• Example: Integer data type – whole numbers in some defined range.
• Operations that can be performed on the data
• Example: add, subtract, divide, multiply and other operation
• Object Oriented Programming:
• The latest development in the theory of program design.
• The functions are developed around an object, such as a linked list.
• Encapsulation:
• One of the part of OOPs concept.
• It is one of the primary concepts behind the abstract data type.
• Abstract data type is implemented in C++ class.
Data Types:
• Atomic data
• Composite data
Atomic data:
• They are data that we choose to consider as a single,
non-decomposable/inseparable entity.
• Example: Integer 4562 consider as a single integer value.
• An atomic data type is a set of atomic data with identical
properties.
• Atomic data types are defined by a set of values and a
set of operations that act on the values.
Atomic data type:
• A set of atomic values
• A set of operations on those values
Example for atomic data types:
• Integer values:- -2, -1, 0, 1, 2, 765
operation: +,-,*,/……
• Float-point values:- ,……,0.0, 0.1, 2.34, 35.890
operations:+,-,*,/….
• Character values: ‘A’,’B’,……’Z’, ‘a’, ’b’…..
operation:+,-,
Composite data:
• The opposite of atomic data is composite data.
• It can be broken out into sub-fields that have meeting.
• Example:
• Your telephone number.
• Because the number has three different parts.
• First – area code
• Second – ph.no is actually two different data items, a
prefix consisting of a three-digit exchange
• Third – The number within exchange, consisting of four
digits.
• Prefixes were names such as DAvenport and Cypress.
Example for composite data types:
Data
• Values: 09-09-2020
• Separated into day, month & year
• Operations: add two data values
• subtract two data values
Data Structure:
• A data structure is an aggregation of atomic and
composite data types into a set with defined relationships.
• Data is a value
• Structure is a set of rules that hold the data together.
• Otherwise, if we take a combination of data types and fit
them into a structure such can define its relating rules.
• Example:
• Array and record
Important:
• A combination of elements each of which is either a data
type or another data structure.
• A set of associations or relationships involving the
combined elements.
Array Record
Homogeneous sequence of data or
data types known as elements
Heterogeneous combination of data
into a single structure with an
identified key.
Position association among the
elements
No association
Abstract Data Type (ADT):
• When we first started programming, there were no abstract
data types.
• If we wanted to read a file, we wrote the code to read the
physical file
• device.
• It did not take long to realize that we were writing the same
code over and over again.
• We wrote the code to read a file and placed it in a library
for all programmers to use.
• This concept is found in modern languages today.
• The code to read the keyboard is an ADT.
• It has a data structure, a character, and a set of
operations that can be used to read that data structure.
• Using the ADT we can not only read characters but we
can also convert them into different data structures such
as integers and strings.
• The ADT consists of a set of definitions that allow
programmers to use the functions while hiding the
implementation.
• This generalization of operations with unspecified
implementations is known as abstraction.
The concept of abstraction means:
• 1. We know what a data type can do.
• 2. How it is done is hidden.
Solutions:
• We can write a program that simulates the queue our
analyst needs.
• We can write a queue ADT that can be used to solve any
queue problem.
• An abstract data type is a data declaration packaged
together with the operations that are meaningful for the
data type.
• We can encapsulate the data and the operations on the
data, and then we hide them from the user.
Abstract Data Type
• 1. Declaration of data
• 2. Declaration of operations
• 3. Encapsulation of data and operations
Data structure Unit-I Part A
ADT Operations:
• Types of ADT operations:
• Constructors
• No preconditions
• Postconditions describe the “value” of the ADT instance,
by telling what the access functions return
• Access functions
• No postconditions
• Manipulation procedures
• Postconditions describe the “value” of the ADT instance,
by telling what the access functions return
ADT Data Structure:
• Develop like stacks, queues, lists, binary search
• trees, AVL trees, B-trees, heaps, and graphs.
Data structure Unit-I Part A
ADT Class Templates:
• Two general components of structure are the data and
key identifier.
• The data structure is given a template identifier of TYPE
which the application programmer must use ADT class us
defined.
• The template is a key type identifier, KTYPE.
• The application programmer must use this type when
creating the data structure in the program.
ADT Class Template Implementation:

More Related Content

PPTX
CPP17 - File IO
PPTX
I pv6(internet protocol version 6)
PPT
Lucece Indexing
PPT
ASP.NET Session 7
PPTX
Unit 2 linked list
PDF
The Evolution of Lucene & Solr Numerics from Strings to Points: Presented by ...
PDF
Chapter 4 internetworking [compatibility mode]
PPTX
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
CPP17 - File IO
I pv6(internet protocol version 6)
Lucece Indexing
ASP.NET Session 7
Unit 2 linked list
The Evolution of Lucene & Solr Numerics from Strings to Points: Presented by ...
Chapter 4 internetworking [compatibility mode]
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...

What's hot (20)

PPTX
Getting Started with R
PPTX
Javaiostream
PPT
Data structure
PDF
What is in a Lucene index?
ODP
Search Lucene
PDF
Flexible Indexing in Lucene 4.0
PDF
Munching & crunching - Lucene index post-processing
PPT
INTERNET PROTOCOL VERSION 6
PDF
Berlin Buzzwords 2013 - How does lucene store your data?
PPT
Lucene BootCamp
PPT
Comparison between ipv4 and ipv6
PPTX
Internet Protocol version 6
PDF
Ii pu cs practical viva voce questions
PPT
PPTX
Indexing structure for files
PPT
Internet Protocol Version 6 By Suvo 2002
PPTX
Unit 1 abstract data types
PPTX
Email Forensics
PPT
Data Structures & Algorithms
PPTX
IPv6 address
Getting Started with R
Javaiostream
Data structure
What is in a Lucene index?
Search Lucene
Flexible Indexing in Lucene 4.0
Munching & crunching - Lucene index post-processing
INTERNET PROTOCOL VERSION 6
Berlin Buzzwords 2013 - How does lucene store your data?
Lucene BootCamp
Comparison between ipv4 and ipv6
Internet Protocol version 6
Ii pu cs practical viva voce questions
Indexing structure for files
Internet Protocol Version 6 By Suvo 2002
Unit 1 abstract data types
Email Forensics
Data Structures & Algorithms
IPv6 address
Ad

Similar to Data structure Unit-I Part A (20)

PDF
introduction of Data structure with example
PPTX
Chap_________________1_Introduction.pptx
PPTX
Data Structures_Introduction to algorithms.pptx
PPTX
ADS Introduction
PPTX
Unit 1, ADA.pptx
PPTX
Introduction to C ++.pptx
PPT
Basics of c++ Programming Language
DOCX
Data structure and algorithm.
PPTX
PDF
Data structures and algorithms Module-1.pdf
PPT
ds 1 Introduction to Data Structures.ppt
PPT
Basic elements of java
PDF
INTRODUCTION TO C PROGRAMMING in basic c language
PPTX
Intro to Data Structure & Algorithms
PDF
DSA
PPTX
Data Structure and Algorithms
PDF
1-Algorithm Analysijhjhjhjhjhjhjhjhjhjs.pdf
PPT
Basic terminologies & asymptotic notations
PPTX
Searching Algorithms
PPTX
C programming language tutorial
introduction of Data structure with example
Chap_________________1_Introduction.pptx
Data Structures_Introduction to algorithms.pptx
ADS Introduction
Unit 1, ADA.pptx
Introduction to C ++.pptx
Basics of c++ Programming Language
Data structure and algorithm.
Data structures and algorithms Module-1.pdf
ds 1 Introduction to Data Structures.ppt
Basic elements of java
INTRODUCTION TO C PROGRAMMING in basic c language
Intro to Data Structure & Algorithms
DSA
Data Structure and Algorithms
1-Algorithm Analysijhjhjhjhjhjhjhjhjhjs.pdf
Basic terminologies & asymptotic notations
Searching Algorithms
C programming language tutorial
Ad

More from SSN College of Engineering, Kalavakkam (20)

PDF
Localization, Classification, and Evaluation.pdf
PPTX
Database Management System - 2a
PPTX
Database Management System
PPTX
Unit III - Inventory Problems
PPTX
PPTX
PPTX
PPTX
Unit IV-Project Management
PPTX
Web technology Unit-II Part-C
PPTX
Data structure Unit-I Part-C
PPTX
Data structure unit I part B
PPTX
Web technology Unit-II Part A
PPTX
Web technology Unit-I Part E

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Lesson notes of climatology university.
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
01-Introduction-to-Information-Management.pdf
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
RMMM.pdf make it easy to upload and study
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
master seminar digital applications in india
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Trump Administration's workforce development strategy
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
Complications of Minimal Access Surgery at WLH
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Lesson notes of climatology university.
LDMMIA Reiki Yoga Finals Review Spring Summer
01-Introduction-to-Information-Management.pdf
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
RMMM.pdf make it easy to upload and study
Supply Chain Operations Speaking Notes -ICLT Program
master seminar digital applications in india
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Module 4: Burden of Disease Tutorial Slides S2 2025
Trump Administration's workforce development strategy
What if we spent less time fighting change, and more time building what’s rig...
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Cell Structure & Organelles in detailed.
Final Presentation General Medicine 03-08-2024.pptx
Final Presentation General Medicine 03-08-2024.pptx

Data structure Unit-I Part A

  • 2. Syllabus: • Introduction: • Pseudo code • Algorithm Header • Purpose, Conditions, Return • Statement Numbers • Variables • Algorithm Analysis • Statement Constructs • Pseudo Example
  • 3. • The Abstract Data Type • Atomic and Composite Data • Data Structure • Abstract Data Type • A model for an Abstract Data Type • ADT Operations • ADT Data Structure • ADT Class Templates • Algorithm Efficiency • Linear Loops • Logarithmic Loops • Nested Loops • Big-O Notation • Standard Measures of Efficiency • Big-O Analysis Examples
  • 4. • Searching: • List Searches • Sequential Search • Sequential Search Algorithm • Variations on Sequential • Searches • Sentinel Search • Probability Search • Ordered List Search • Binary Search • Target Found • Target Not Found • Binary Search Algorithm • Binary Search Algorithms • Analyzing Search Algorithms • Sequential Search • Binary Search
  • 5. • Hashed List Searches • Basic Concepts • Hashing Methods • Direct Method • Subtraction Method • Modulo-division Method • Digit-extraction Method • Midsquare Method • Folding Methods • Rotation Method • Pseudorandom Hashing • One Hashing Algorithm • Collision Resolution • Open Addressing • Linear Probe • Quadratic Probe Pseudorandom Collision • Resolution • Key Offset • Linked List Resolution • Bucket Hashing • Combination Approaches • Hash List Example
  • 6. Pseudo Code: • Several tools are used to define algorithms, one of the most common is pseudo code. • It is an English like representation of the code required for an algorithm. • It provides a related syntax that is easy to read.
  • 7. Pseudo code • It is a compact and informal high-level description program. • { • pseudo = imitation or false, • code = instruct written in program language • } • It is used for planning a program • It is also called as Program Design Language (PDL).
  • 8. • Logical Structure of Pseudo code: • Sequence logic • Selection logic • Iteration logic • One of the most common tools for defining algorithms is pseudo code, which is part English, part structured code.
  • 9. • This data definition describes a node in a self- referential linked list that consists of a nested structure (data) and a pointer to the next node (link).
  • 14. Algorithm Header: • Each algorithm begins with a header that names it, describes its parameters, and lists any pre and post conditions. • Important because the programmer using the algorithm often sees only the header information, not the complete algorithm.
  • 16. Purpose: • It is a short statement about what the algorithms does. • It needs to describe only the general algorithms processing. • It should not attempt to describe all of the processing.
  • 17. Conditions: • Precondition: • It lists any precursor requirements for the parameters. • Postcondition: • It identifies any action taken and the status of any output parameters.
  • 18. Return: • If a value is returned, it will be identified by a return condition. • Often there is none, and no return condition is needed.
  • 19. Statements Numbers: • They are numbered using an abbreviated decimal notation in which only the last of the number sequence. • It is shown on each statement. • End/Exit conditions: • The end of the selection is indicated by the end. • The end of the loop is indicated by end statement/loop.
  • 20. Variables: • It is not necessary to define every variable used in the algorithm, especially when the context of the data is indicated by its name. • The selection of the name for an algorithm or variable goes a long way toward making the algorithm and its coded implementation more readable.
  • 21. Rules: Don’t use single character names. • Example: • Variable i and j use in C++ for loops. • There is always a better name. Don’t use generic names. • Example: • Generic names are count, sum, total, row, column and file. Abbreviations aren’t excluded as intelligent data names. • Example: • stuCnt is good abbreviation for studentCount.
  • 22. Algorithm Analysis: • Not every line of code is explained. • Rather, the analysis examines only those points that either need to be emphasized or that may require some clarification. • It also often introduces style or efficiency considerations.
  • 23. Statement Constructs: • Niklaus Wirth stated that any algorithm could be written with only three programming constructs: sequence, selection and loop. • Our pseudo code contains only these three basic constructs.
  • 24. Sequence Statements: • It is a series of statements that don’t alter the execution path within an algorithm. • It is obvious that statements such as assign and add are sequence statements. • It is lies in the structured programming concept. • When an algorithm completes, it returns to the statement immediately after the call that invoked it.
  • 25. Selection Statements: • It evaluate one or more alternatives. • If the alternatives are true, one path is taken. • If the alternatives are false, a different path is taken. • The typical selection statement is the two-way selection
  • 27. Loop Statement: • It iterates a block of code. • The loop that we use in our pseudo code most closely resembles the while loop.
  • 29. Pseudocode Example: • Algorithm deviation • Pre nothing • Post average and numbers with their deviation printed • 1 i = 0 • 2 loop (not end of file) • 1 read number into array[i] • 2 sum = sum + number • 3 I = i+1 • 3 end loop • 4 average = sum / i • 5 print (average)
  • 30. • 6 j = 0 • 7 loop (j < i) • 1 devFromAve = array[j] – average • 2 print (array[j], devFromAve) • 3 j = j +1 • 8 end loop • 9 return • end deviation
  • 31. The Abstract Data Type: • We started with non-structured, linear programs, known as spaghetti code. • In which the logic flow wound through the program like spaghetti on a plate. • The concept of modular programming, in which programs were organized in functions, each of which still used a linear coding techniques.
  • 32. • Data Type: • A set of data • Example: Integer data type – whole numbers in some defined range. • Operations that can be performed on the data • Example: add, subtract, divide, multiply and other operation • Object Oriented Programming: • The latest development in the theory of program design. • The functions are developed around an object, such as a linked list. • Encapsulation: • One of the part of OOPs concept. • It is one of the primary concepts behind the abstract data type. • Abstract data type is implemented in C++ class.
  • 33. Data Types: • Atomic data • Composite data
  • 34. Atomic data: • They are data that we choose to consider as a single, non-decomposable/inseparable entity. • Example: Integer 4562 consider as a single integer value. • An atomic data type is a set of atomic data with identical properties. • Atomic data types are defined by a set of values and a set of operations that act on the values.
  • 35. Atomic data type: • A set of atomic values • A set of operations on those values
  • 36. Example for atomic data types: • Integer values:- -2, -1, 0, 1, 2, 765 operation: +,-,*,/…… • Float-point values:- ,……,0.0, 0.1, 2.34, 35.890 operations:+,-,*,/…. • Character values: ‘A’,’B’,……’Z’, ‘a’, ’b’….. operation:+,-,
  • 37. Composite data: • The opposite of atomic data is composite data. • It can be broken out into sub-fields that have meeting. • Example: • Your telephone number. • Because the number has three different parts. • First – area code • Second – ph.no is actually two different data items, a prefix consisting of a three-digit exchange • Third – The number within exchange, consisting of four digits. • Prefixes were names such as DAvenport and Cypress.
  • 38. Example for composite data types: Data • Values: 09-09-2020 • Separated into day, month & year • Operations: add two data values • subtract two data values
  • 39. Data Structure: • A data structure is an aggregation of atomic and composite data types into a set with defined relationships. • Data is a value • Structure is a set of rules that hold the data together. • Otherwise, if we take a combination of data types and fit them into a structure such can define its relating rules. • Example: • Array and record
  • 40. Important: • A combination of elements each of which is either a data type or another data structure. • A set of associations or relationships involving the combined elements.
  • 41. Array Record Homogeneous sequence of data or data types known as elements Heterogeneous combination of data into a single structure with an identified key. Position association among the elements No association
  • 43. • When we first started programming, there were no abstract data types. • If we wanted to read a file, we wrote the code to read the physical file • device. • It did not take long to realize that we were writing the same code over and over again. • We wrote the code to read a file and placed it in a library for all programmers to use.
  • 44. • This concept is found in modern languages today. • The code to read the keyboard is an ADT. • It has a data structure, a character, and a set of operations that can be used to read that data structure. • Using the ADT we can not only read characters but we can also convert them into different data structures such as integers and strings.
  • 45. • The ADT consists of a set of definitions that allow programmers to use the functions while hiding the implementation. • This generalization of operations with unspecified implementations is known as abstraction. The concept of abstraction means: • 1. We know what a data type can do. • 2. How it is done is hidden.
  • 46. Solutions: • We can write a program that simulates the queue our analyst needs. • We can write a queue ADT that can be used to solve any queue problem.
  • 47. • An abstract data type is a data declaration packaged together with the operations that are meaningful for the data type. • We can encapsulate the data and the operations on the data, and then we hide them from the user. Abstract Data Type • 1. Declaration of data • 2. Declaration of operations • 3. Encapsulation of data and operations
  • 49. ADT Operations: • Types of ADT operations: • Constructors • No preconditions • Postconditions describe the “value” of the ADT instance, by telling what the access functions return • Access functions • No postconditions • Manipulation procedures • Postconditions describe the “value” of the ADT instance, by telling what the access functions return
  • 50. ADT Data Structure: • Develop like stacks, queues, lists, binary search • trees, AVL trees, B-trees, heaps, and graphs.
  • 52. ADT Class Templates: • Two general components of structure are the data and key identifier. • The data structure is given a template identifier of TYPE which the application programmer must use ADT class us defined. • The template is a key type identifier, KTYPE. • The application programmer must use this type when creating the data structure in the program.
  • 53. ADT Class Template Implementation: