Lec2 Introduction - 2
Lec2 Introduction - 2
Data Structures
FALL 2022
Abstract Data Types - ADT
Used Everywhere!
American Scientist
says: in top 12 books
of the CENTURY!
tradeoffs!
Data Types
integer, array, Operations
pointers, … Insert, search, delete,
…
Developing the ADTs
• Present an ADT
• Motivate with some applications
• Repeat until it’s time to move on:
– develop a data structure and algorithms for the ADT
– analyze its properties
efficiency
correctness
limitations
ease of programming
• Contrast strengths and weaknesses
First Example: Queue ADT
• Queue operations
– create
– destroy
– enqueue
– dequeue
– is_empty
• Queue property: if x is enQed before y is enQed, then x will be
deQed before y is deQed
• FIFO: First In First Out