SlideShare a Scribd company logo
1 of 19
List
A List ADT
List
• Lists are one of the most common
organizing tools people use in their
day-to-day lives.
List
• We have :
• to-do lists,
• grocery lists,
• top-ten lists,
• bottom-ten lists,
• and many other types.
List
• Our computer programs can also use
lists, particularly if we only have a few
items to storein list form.
List
• Lists are especially useful if we don’t
have to perform searches on the items in
the list or put them into some type of
sorted order.
List
• When we need to perform long
searches or complex sorts, lists become
less useful, especially with more complex
data structures.
A List ADT
• In order to design an ADT for a list, we
have to provide a definition of the list,
including its properties, as well as the
operations performed on it and by
it.
A List ADT
• A list is an ordered sequence of data.
Each data item stored in a list is called an
element.
• In JavaScript, the elements of a list can be
of any data type.
A List ADT
• There is no predetermined number
of elements that can be stored in a
list.
• The Limit will be the amount of memory
available to the program using the list.
A List ADT
• A list with no elements is an
empty list.
• The number of elements stored in a
list is called the length of the list.
A List ADT
• You can append an element to the
end of a list.
• or you can insert an element into a list after
an existing element
• or at the beginning of a list.
A List ADT
• Elements are deleted from a list
using a remove operation.
• You can also clear a list so that all of its
current elements are removed.
A List ADT
• The elements of a list are
displayed using either a
toString() operation.
A List ADT
• with a getElement() operation,
which displays the value of the
current element at a position.
A List ADT
• Lists have properties to describe
location. There is the front of a
list and the end of a list.
A List ADT
• You can move from one element of a
list to the next element using the
next() operation.
• you can move backward through a list using
the prev() operation
A List ADT
• You can also move to a numbered
position in a list using the
moveTo(n) operation.
• where n specifies the position to move to.
A List ADT
• The List ADT does not specify a
storage function for a list, but for
our implementation will use an
array named dataStore.
A List ADT

More Related Content

What's hot (20)

R DATA STRUCTURES 2
R DATA STRUCTURES 2R DATA STRUCTURES 2
R DATA STRUCTURES 2
 
R DATA STRUCTURES 1
R DATA STRUCTURES 1R DATA STRUCTURES 1
R DATA STRUCTURES 1
 
General Data structures
General Data structuresGeneral Data structures
General Data structures
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Lists in Python
Lists in PythonLists in Python
Lists in Python
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
Loops and arrays
Loops and arraysLoops and arrays
Loops and arrays
 
702 present
702 present702 present
702 present
 
Arrays
ArraysArrays
Arrays
 
Array in c
Array in cArray in c
Array in c
 
Algorithm and Programming (Searching)
Algorithm and Programming (Searching)Algorithm and Programming (Searching)
Algorithm and Programming (Searching)
 
List data structure
List data structure List data structure
List data structure
 
Understanding the components of standard template library
Understanding the components of standard template libraryUnderstanding the components of standard template library
Understanding the components of standard template library
 
Collections (1)
Collections (1)Collections (1)
Collections (1)
 
Intro++ to C#
Intro++ to C#Intro++ to C#
Intro++ to C#
 
Report cs3 pillos
Report cs3 pillosReport cs3 pillos
Report cs3 pillos
 
C
CC
C
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Searching algorithms
Searching algorithmsSearching algorithms
Searching algorithms
 
Vector list nd sequence
Vector list nd sequenceVector list nd sequence
Vector list nd sequence
 

Similar to List ADT: An Ordered Sequence of Data Elements

Lesson 2 - The List ADT.pdf
Lesson 2 - The List ADT.pdfLesson 2 - The List ADT.pdf
Lesson 2 - The List ADT.pdfLeandroJrErcia
 
Data structures - unit 1
Data structures - unit 1Data structures - unit 1
Data structures - unit 1SaranyaP45
 
Data structures and Algorithm analysis_Lecture 2.pptx
Data structures and Algorithm analysis_Lecture 2.pptxData structures and Algorithm analysis_Lecture 2.pptx
Data structures and Algorithm analysis_Lecture 2.pptxAhmedEldesoky24
 
MODULE-2.pptx
MODULE-2.pptxMODULE-2.pptx
MODULE-2.pptxASRPANDEY
 
Data Structure & Algorithms - Operations
Data Structure & Algorithms - OperationsData Structure & Algorithms - Operations
Data Structure & Algorithms - Operationsbabuk110
 
List , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in pythonList , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in pythonchanna basava
 
Python Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptxPython Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptxShreyasLawand
 
Python programming
Python programmingPython programming
Python programmingsirikeshava
 
Lists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data TypesLists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data TypesHasan Dwi Cahyono
 
unit-ids17-180709051413-1.pdf
unit-ids17-180709051413-1.pdfunit-ids17-180709051413-1.pdf
unit-ids17-180709051413-1.pdfKarthiKeyan326587
 
unit 1_Linked list.pptx
unit 1_Linked list.pptxunit 1_Linked list.pptx
unit 1_Linked list.pptxssuser7922b8
 
DS Module1 (1).pptx
DS Module1 (1).pptxDS Module1 (1).pptx
DS Module1 (1).pptxAnuJoseph95
 

Similar to List ADT: An Ordered Sequence of Data Elements (20)

Data structures list
Data structures listData structures list
Data structures list
 
Lesson 2 - The List ADT.pdf
Lesson 2 - The List ADT.pdfLesson 2 - The List ADT.pdf
Lesson 2 - The List ADT.pdf
 
lecture 02.2.ppt
lecture 02.2.pptlecture 02.2.ppt
lecture 02.2.ppt
 
Data structures - unit 1
Data structures - unit 1Data structures - unit 1
Data structures - unit 1
 
Data structures and Algorithm analysis_Lecture 2.pptx
Data structures and Algorithm analysis_Lecture 2.pptxData structures and Algorithm analysis_Lecture 2.pptx
Data structures and Algorithm analysis_Lecture 2.pptx
 
MODULE-2.pptx
MODULE-2.pptxMODULE-2.pptx
MODULE-2.pptx
 
ds bridge.pptx
ds bridge.pptxds bridge.pptx
ds bridge.pptx
 
Data Structure & Algorithms - Operations
Data Structure & Algorithms - OperationsData Structure & Algorithms - Operations
Data Structure & Algorithms - Operations
 
List , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in pythonList , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in python
 
Python Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptxPython Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptx
 
Python programming
Python programmingPython programming
Python programming
 
Lists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data TypesLists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data Types
 
unit-ids17-180709051413-1.pdf
unit-ids17-180709051413-1.pdfunit-ids17-180709051413-1.pdf
unit-ids17-180709051413-1.pdf
 
Unit 1.ppt
Unit 1.pptUnit 1.ppt
Unit 1.ppt
 
unit 1_Linked list.pptx
unit 1_Linked list.pptxunit 1_Linked list.pptx
unit 1_Linked list.pptx
 
Data Structures 3
Data Structures 3Data Structures 3
Data Structures 3
 
Intro ds
Intro dsIntro ds
Intro ds
 
DS Module1 (1).pptx
DS Module1 (1).pptxDS Module1 (1).pptx
DS Module1 (1).pptx
 
Datastrucure
DatastrucureDatastrucure
Datastrucure
 
2- link-list.ppt
2- link-list.ppt2- link-list.ppt
2- link-list.ppt
 

More from Samuel Santos

Javascript Canvas API
Javascript Canvas APIJavascript Canvas API
Javascript Canvas APISamuel Santos
 
Javascript - Numbers
Javascript   - NumbersJavascript   - Numbers
Javascript - NumbersSamuel Santos
 
Javascript - Arrays - mutator functions
Javascript  - Arrays - mutator functionsJavascript  - Arrays - mutator functions
Javascript - Arrays - mutator functionsSamuel Santos
 
Javascript - Arrays - accessor functions
Javascript   - Arrays - accessor functionsJavascript   - Arrays - accessor functions
Javascript - Arrays - accessor functionsSamuel Santos
 
Javascript - Array - Writing
Javascript - Array - WritingJavascript - Array - Writing
Javascript - Array - WritingSamuel Santos
 
Javascript - Array - Creating Array
Javascript - Array - Creating ArrayJavascript - Array - Creating Array
Javascript - Array - Creating ArraySamuel Santos
 
Javascript - Arithmetic in Javascript
Javascript - Arithmetic in JavascriptJavascript - Arithmetic in Javascript
Javascript - Arithmetic in JavascriptSamuel Santos
 
Javascript - ADT - List - Implementation
Javascript - ADT -  List - ImplementationJavascript - ADT -  List - Implementation
Javascript - ADT - List - ImplementationSamuel Santos
 

More from Samuel Santos (11)

Javascript stack
Javascript   stackJavascript   stack
Javascript stack
 
Javascript Canvas API
Javascript Canvas APIJavascript Canvas API
Javascript Canvas API
 
Javascript - Numbers
Javascript   - NumbersJavascript   - Numbers
Javascript - Numbers
 
Javascript - Arrays - mutator functions
Javascript  - Arrays - mutator functionsJavascript  - Arrays - mutator functions
Javascript - Arrays - mutator functions
 
Javascript - Arrays - accessor functions
Javascript   - Arrays - accessor functionsJavascript   - Arrays - accessor functions
Javascript - Arrays - accessor functions
 
Javascript - Array - Writing
Javascript - Array - WritingJavascript - Array - Writing
Javascript - Array - Writing
 
Javascript - Array - Creating Array
Javascript - Array - Creating ArrayJavascript - Array - Creating Array
Javascript - Array - Creating Array
 
Javascript - Arithmetic in Javascript
Javascript - Arithmetic in JavascriptJavascript - Arithmetic in Javascript
Javascript - Arithmetic in Javascript
 
Javascript - ADT - List - Implementation
Javascript - ADT -  List - ImplementationJavascript - ADT -  List - Implementation
Javascript - ADT - List - Implementation
 
Variables
VariablesVariables
Variables
 
Java Stack (Pilha)
Java Stack (Pilha)Java Stack (Pilha)
Java Stack (Pilha)
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

List ADT: An Ordered Sequence of Data Elements

  • 2. List • Lists are one of the most common organizing tools people use in their day-to-day lives.
  • 3. List • We have : • to-do lists, • grocery lists, • top-ten lists, • bottom-ten lists, • and many other types.
  • 4. List • Our computer programs can also use lists, particularly if we only have a few items to storein list form.
  • 5. List • Lists are especially useful if we don’t have to perform searches on the items in the list or put them into some type of sorted order.
  • 6. List • When we need to perform long searches or complex sorts, lists become less useful, especially with more complex data structures.
  • 7. A List ADT • In order to design an ADT for a list, we have to provide a definition of the list, including its properties, as well as the operations performed on it and by it.
  • 8. A List ADT • A list is an ordered sequence of data. Each data item stored in a list is called an element. • In JavaScript, the elements of a list can be of any data type.
  • 9. A List ADT • There is no predetermined number of elements that can be stored in a list. • The Limit will be the amount of memory available to the program using the list.
  • 10. A List ADT • A list with no elements is an empty list. • The number of elements stored in a list is called the length of the list.
  • 11. A List ADT • You can append an element to the end of a list. • or you can insert an element into a list after an existing element • or at the beginning of a list.
  • 12. A List ADT • Elements are deleted from a list using a remove operation. • You can also clear a list so that all of its current elements are removed.
  • 13. A List ADT • The elements of a list are displayed using either a toString() operation.
  • 14. A List ADT • with a getElement() operation, which displays the value of the current element at a position.
  • 15. A List ADT • Lists have properties to describe location. There is the front of a list and the end of a list.
  • 16. A List ADT • You can move from one element of a list to the next element using the next() operation. • you can move backward through a list using the prev() operation
  • 17. A List ADT • You can also move to a numbered position in a list using the moveTo(n) operation. • where n specifies the position to move to.
  • 18. A List ADT • The List ADT does not specify a storage function for a list, but for our implementation will use an array named dataStore.