SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Abstract Data Types
Reggie Santos
UP ITDC
Content mostly adapted from Mike Scott, UT Austin
Outline
Definition of ADT
Set
List
Stack
Outline
Queue
Map
Tree
Graph
Abstract Data Type
(ADT)
Stores data
Allows various operations on the
data to access or change it
Why Abstract?
Specify the operations of the data
structure and leave implementation
details for later
High-level languages often provide
built-in data structures
The Core
Operations
Every Collection ADT should
provide a way to:
Add an item
Remove an item
Find, retrieve, or access an item
Additional
Operations
More possibilities:
Is the collection empty?
Make the collection empty
Give a subset of the collection
–David Jones
“Get your data structures correct
first, and the rest of the program
will write itself.”
Program Logic Formulation
Image credit: Ledork via flickr Creative Commons
Set
Unordered collection of data items
No duplicate items are allowed
Image credit: pasukaru76 via flickr Creative Commons
Image credit: Stacy Spensley via flickr Creative Commons
List
Ordered collection of data items
Order is important
Image credit: Frances Dinkelspiel via flickr Creative Commons
By Zzubnik (Own work) [CC-BY-3.0 (http://creativecommons.org/licenses/by/3.0)],
via Wikimedia Commons
Stack
Ordered collection of data items
LIFO (Last In First Out)
Only the element at the top may be
accessed at any point in time
Stack
Core operations:
push(x)
pop(x)
Stack
Image credit: Toyhouse.cc Creative Commons
Image credit: gadl via flickr
Queue
Ordered collection of data items
FIFO (First In First Out)
Inserts an element at the rear and
ejects an element from the front
Queue
Core operations:
enqueue(x) - at rear
dequeue(x) - from front
Queue
By Choon Boo LIM Creative Commons
By Wilton Scout Group Creative Commons
Map
Collection of key-value pairs
Also called a:
Hashtable
Dictionary
Symbol table
Associative array
Map
By John Gasson Creative Commons
By intotheforest via Flickr Creative Commons
By Da Pino Creative Commons
Tree
Collection of nodes (starting at a
root node) where each node
contains a data value and a list of
references to other nodes, with the
constraints that no reference is
duplicated, and none points to the
root
Tree
By Claudio Rocchini (Own work) [GFDL, CC-BY-
SA-3.0, CC-BY-SA-2.5], via Wikimedia Commons
By Vector Fresh Creative Commons
Graph
Finite set of ordered pairs, called
edges or arcs, of certain entities
called nodes or vertices
An edge (x, y) is said to point or
go from x to y
Graph
Summary
Definition of ADT
Set
List
Stack
Summary
Queue
Map
Tree
Graph
References
Mike Scott’s set of slides, University of
Texas Austin
Wikipedia
For images:
Wikimedia Commons
Flickr

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Linklist
LinklistLinklist
Linklist
 
Binary Search Tree in Data Structure
Binary Search Tree in Data StructureBinary Search Tree in Data Structure
Binary Search Tree in Data Structure
 
MYSQL - PHP Database Connectivity
MYSQL - PHP Database ConnectivityMYSQL - PHP Database Connectivity
MYSQL - PHP Database Connectivity
 
AVL Tree
AVL TreeAVL Tree
AVL Tree
 
Hashing
HashingHashing
Hashing
 
Data Structure and Algorithms
Data Structure and Algorithms Data Structure and Algorithms
Data Structure and Algorithms
 
Binary search tree in data structures
Binary search tree in  data structuresBinary search tree in  data structures
Binary search tree in data structures
 
Priority queues
Priority queuesPriority queues
Priority queues
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
 
Polynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxPolynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptx
 
Sql operators & functions 3
Sql operators & functions 3Sql operators & functions 3
Sql operators & functions 3
 
Queue
QueueQueue
Queue
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Introduction to triggers
Introduction to triggersIntroduction to triggers
Introduction to triggers
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
 
Heap tree
Heap treeHeap tree
Heap tree
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2
 
Procedure and Functions in pl/sql
Procedure and Functions in pl/sqlProcedure and Functions in pl/sql
Procedure and Functions in pl/sql
 

Andere mochten auch

Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Hassan Ahmed
 
11 abstract data types
11 abstract data types11 abstract data types
11 abstract data types
jigeno
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
Tony Nguyen
 
03 data abstraction
03 data abstraction03 data abstraction
03 data abstraction
Opas Kaewtai
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
Harry Potter
 
Array linear data_structure_2 (1)
Array linear data_structure_2 (1)Array linear data_structure_2 (1)
Array linear data_structure_2 (1)
eShikshak
 
บทที่ 2 สถาปัตยกรรม
บทที่ 2 สถาปัตยกรรมบทที่ 2 สถาปัตยกรรม
บทที่ 2 สถาปัตยกรรม
PrinceStorm Nueng
 
Stacks and queue
Stacks and queueStacks and queue
Stacks and queue
Amit Vats
 

Andere mochten auch (20)

Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Algo>Abstract data type
Algo>Abstract data typeAlgo>Abstract data type
Algo>Abstract data type
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
 
11 abstract data types
11 abstract data types11 abstract data types
11 abstract data types
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Data abstraction the walls
Data abstraction the wallsData abstraction the walls
Data abstraction the walls
 
Preparation Data Structures 03 abstract data_types
Preparation Data Structures 03 abstract data_typesPreparation Data Structures 03 abstract data_types
Preparation Data Structures 03 abstract data_types
 
03 data abstraction
03 data abstraction03 data abstraction
03 data abstraction
 
Slide 3 data abstraction & 3 schema
Slide 3 data abstraction & 3 schemaSlide 3 data abstraction & 3 schema
Slide 3 data abstraction & 3 schema
 
Algo>ADT list & linked list
Algo>ADT list & linked listAlgo>ADT list & linked list
Algo>ADT list & linked list
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Lec3
Lec3Lec3
Lec3
 
Chapter03
Chapter03Chapter03
Chapter03
 
2CPP14 - Abstraction
2CPP14 - Abstraction2CPP14 - Abstraction
2CPP14 - Abstraction
 
Array linear data_structure_2 (1)
Array linear data_structure_2 (1)Array linear data_structure_2 (1)
Array linear data_structure_2 (1)
 
บทที่ 2 สถาปัตยกรรม
บทที่ 2 สถาปัตยกรรมบทที่ 2 สถาปัตยกรรม
บทที่ 2 สถาปัตยกรรม
 
Stacks and queue
Stacks and queueStacks and queue
Stacks and queue
 
Stacks, Queues, Deques
Stacks, Queues, DequesStacks, Queues, Deques
Stacks, Queues, Deques
 
Unit i data structure FYCS MUMBAI UNIVERSITY SEM II
Unit i  data structure FYCS MUMBAI UNIVERSITY SEM II Unit i  data structure FYCS MUMBAI UNIVERSITY SEM II
Unit i data structure FYCS MUMBAI UNIVERSITY SEM II
 
Stack in Sata Structure
Stack in Sata StructureStack in Sata Structure
Stack in Sata Structure
 

Ähnlich wie Abstract Data Types

05 entity framework
05 entity framework05 entity framework
05 entity framework
glubox
 
EclipseCon2011 Cross-Platform Mobile Development with Eclipse
EclipseCon2011 Cross-Platform Mobile Development with EclipseEclipseCon2011 Cross-Platform Mobile Development with Eclipse
EclipseCon2011 Cross-Platform Mobile Development with Eclipse
Heiko Behrens
 

Ähnlich wie Abstract Data Types (20)

mx & dbs
mx & dbsmx & dbs
mx & dbs
 
Stack Data structure
Stack Data structureStack Data structure
Stack Data structure
 
Stack Data Structre Introduction and source code
Stack Data Structre Introduction and source codeStack Data Structre Introduction and source code
Stack Data Structre Introduction and source code
 
Lecture-05-DSA
Lecture-05-DSALecture-05-DSA
Lecture-05-DSA
 
Lecture 24
Lecture 24Lecture 24
Lecture 24
 
Search Me: Using Lucene.Net
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Net
 
The Global Performing Arts Database
The Global Performing Arts DatabaseThe Global Performing Arts Database
The Global Performing Arts Database
 
Collections and its types in C# (with examples)
Collections and its types in C# (with examples)Collections and its types in C# (with examples)
Collections and its types in C# (with examples)
 
Introduction to D3.js
Introduction to D3.jsIntroduction to D3.js
Introduction to D3.js
 
05 entity framework
05 entity framework05 entity framework
05 entity framework
 
WoSC19: Serverless Workflows for Indexing Large Scientific Data
WoSC19: Serverless Workflows for Indexing Large Scientific DataWoSC19: Serverless Workflows for Indexing Large Scientific Data
WoSC19: Serverless Workflows for Indexing Large Scientific Data
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in java
 
DSJ_Unit III_Collection framework.pdf
DSJ_Unit III_Collection framework.pdfDSJ_Unit III_Collection framework.pdf
DSJ_Unit III_Collection framework.pdf
 
Searching the Web of Things
Searching the Web of ThingsSearching the Web of Things
Searching the Web of Things
 
The Challenge of Using Map-Reduce to Query Open Data
The Challenge of Using Map-Reduce to Query Open DataThe Challenge of Using Map-Reduce to Query Open Data
The Challenge of Using Map-Reduce to Query Open Data
 
4 gouping object
4 gouping object4 gouping object
4 gouping object
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
 
An Open Context for Archaeology
An Open Context for ArchaeologyAn Open Context for Archaeology
An Open Context for Archaeology
 
Core & advanced java classes in mumbai
Core & advanced java classes in mumbaiCore & advanced java classes in mumbai
Core & advanced java classes in mumbai
 
EclipseCon2011 Cross-Platform Mobile Development with Eclipse
EclipseCon2011 Cross-Platform Mobile Development with EclipseEclipseCon2011 Cross-Platform Mobile Development with Eclipse
EclipseCon2011 Cross-Platform Mobile Development with Eclipse
 

Mehr von Reggie Niccolo Santos

Mehr von Reggie Niccolo Santos (15)

Securing PHP Applications
Securing PHP ApplicationsSecuring PHP Applications
Securing PHP Applications
 
Introduction to Web 2.0
Introduction to Web 2.0Introduction to Web 2.0
Introduction to Web 2.0
 
UI / UX Engineering for Web Applications
UI / UX Engineering for Web ApplicationsUI / UX Engineering for Web Applications
UI / UX Engineering for Web Applications
 
Computability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable FunctionComputability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable Function
 
Algorithms - Aaron Bloomfield
Algorithms - Aaron BloomfieldAlgorithms - Aaron Bloomfield
Algorithms - Aaron Bloomfield
 
Program Logic Formulation - Ohio State University
Program Logic Formulation - Ohio State UniversityProgram Logic Formulation - Ohio State University
Program Logic Formulation - Ohio State University
 
Computational Thinking and Data Representations
Computational Thinking and Data RepresentationsComputational Thinking and Data Representations
Computational Thinking and Data Representations
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Application Testing
Application TestingApplication Testing
Application Testing
 
Application Security
Application SecurityApplication Security
Application Security
 
PHP MVC
PHP MVCPHP MVC
PHP MVC
 
MySQL Transactions
MySQL TransactionsMySQL Transactions
MySQL Transactions
 
MySQL Cursors
MySQL CursorsMySQL Cursors
MySQL Cursors
 
MySQL Views
MySQL ViewsMySQL Views
MySQL Views
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java Developers
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
Malaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptxMalaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptx
 
Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...
Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...
Salesforce Introduced Zero Copy Partner Network to Simplify the Process of In...
 
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
Reinforcement Learning – a Rewards Based Approach to Machine Learning - Marko...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
What is an API Development- Definition, Types, Specifications, Documentation.pdf
What is an API Development- Definition, Types, Specifications, Documentation.pdfWhat is an API Development- Definition, Types, Specifications, Documentation.pdf
What is an API Development- Definition, Types, Specifications, Documentation.pdf
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
Sourcing Success - How to Find a Clothing Manufacturer
Sourcing Success - How to Find a Clothing ManufacturerSourcing Success - How to Find a Clothing Manufacturer
Sourcing Success - How to Find a Clothing Manufacturer
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 

Abstract Data Types