SlideShare a Scribd company logo
1 of 6
Download to read offline
ListNode
data: l
next: l
Suppose we want to deep copy a list node, but not the ReadThis object…
ReadThis
url: l
currentPoints: 0
String
value: …
ListNode
data: l
next: l
ReadThis
url: l
currentPoints: 0
String
value: …
Make a new ListNode:
ListNode
data: l
next: l
ListNode
data: l
next: l
Make a new ReadThis:
ListNode
data: l
next: l
name: l
currentPoints: 0
ReadThis
ReadThis
url: l
currentPoints: 0
String
value: …
name: l
currentPoints: 0
ReadThis
ListNode
data: l
next: l
Copy the ReadThis’s String reference and currentPoints value:
ListNode
data: l
next: l
ReadThis
url: l
currentPoints: 0
String
value: …
ListNode
data: l
next: l
Point the new list node’s data to the new ReadThis:
ListNode
data: l
next: l
name: l
currentPoints: 0
ReadThis
ReadThis
url: l
currentPoints: 0
String
value: …
ListNode
data: l
next: l
Now we have a deep copy of the ListNode.
ListNode
data: l
next: l
name: l
currentPoints: 0
ReadThis
ReadThis
url: l
currentPoints: 0
String
value: …

More Related Content

More from Gail Carmichael

References Are 'Nice' Pointers
References Are 'Nice' PointersReferences Are 'Nice' Pointers
References Are 'Nice' PointersGail Carmichael
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort AlgorithmGail Carmichael
 
Find the Maximum Algorithm
Find the Maximum AlgorithmFind the Maximum Algorithm
Find the Maximum AlgorithmGail Carmichael
 
Attracting Women to Computing and Why it Matters
Attracting Women to Computing and Why it MattersAttracting Women to Computing and Why it Matters
Attracting Women to Computing and Why it MattersGail Carmichael
 
Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...
Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...
Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...Gail Carmichael
 
Interactive Storytelling in Games: Next Steps
Interactive Storytelling in Games: Next StepsInteractive Storytelling in Games: Next Steps
Interactive Storytelling in Games: Next StepsGail Carmichael
 
Coherent Emergent Stories - GHC13
Coherent Emergent Stories - GHC13Coherent Emergent Stories - GHC13
Coherent Emergent Stories - GHC13Gail Carmichael
 
Interactive Storytelling (CUSEC 2013)
Interactive Storytelling (CUSEC 2013)Interactive Storytelling (CUSEC 2013)
Interactive Storytelling (CUSEC 2013)Gail Carmichael
 
Understanding the Power of Augmented Reality for Learning
Understanding the Power of Augmented Reality for LearningUnderstanding the Power of Augmented Reality for Learning
Understanding the Power of Augmented Reality for LearningGail Carmichael
 
Interactive Storytelling (CANCON 2012)
Interactive Storytelling (CANCON 2012)Interactive Storytelling (CANCON 2012)
Interactive Storytelling (CANCON 2012)Gail Carmichael
 
Global Context Descriptors for SURF and MSER Feature Descriptors
Global Context Descriptors for SURF and MSER Feature DescriptorsGlobal Context Descriptors for SURF and MSER Feature Descriptors
Global Context Descriptors for SURF and MSER Feature DescriptorsGail Carmichael
 

More from Gail Carmichael (16)

Head and Tail Recursion
Head and Tail RecursionHead and Tail Recursion
Head and Tail Recursion
 
Branching Story Example
Branching Story ExampleBranching Story Example
Branching Story Example
 
Linked List Operations
Linked List OperationsLinked List Operations
Linked List Operations
 
References Are 'Nice' Pointers
References Are 'Nice' PointersReferences Are 'Nice' Pointers
References Are 'Nice' Pointers
 
Pointers
PointersPointers
Pointers
 
Function Call Stack
Function Call StackFunction Call Stack
Function Call Stack
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort Algorithm
 
Find the Maximum Algorithm
Find the Maximum AlgorithmFind the Maximum Algorithm
Find the Maximum Algorithm
 
Attracting Women to Computing and Why it Matters
Attracting Women to Computing and Why it MattersAttracting Women to Computing and Why it Matters
Attracting Women to Computing and Why it Matters
 
Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...
Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...
Thesis Proposal: Creating Satisfying Game Experiences with Coherent Emergent ...
 
Interactive Storytelling in Games: Next Steps
Interactive Storytelling in Games: Next StepsInteractive Storytelling in Games: Next Steps
Interactive Storytelling in Games: Next Steps
 
Coherent Emergent Stories - GHC13
Coherent Emergent Stories - GHC13Coherent Emergent Stories - GHC13
Coherent Emergent Stories - GHC13
 
Interactive Storytelling (CUSEC 2013)
Interactive Storytelling (CUSEC 2013)Interactive Storytelling (CUSEC 2013)
Interactive Storytelling (CUSEC 2013)
 
Understanding the Power of Augmented Reality for Learning
Understanding the Power of Augmented Reality for LearningUnderstanding the Power of Augmented Reality for Learning
Understanding the Power of Augmented Reality for Learning
 
Interactive Storytelling (CANCON 2012)
Interactive Storytelling (CANCON 2012)Interactive Storytelling (CANCON 2012)
Interactive Storytelling (CANCON 2012)
 
Global Context Descriptors for SURF and MSER Feature Descriptors
Global Context Descriptors for SURF and MSER Feature DescriptorsGlobal Context Descriptors for SURF and MSER Feature Descriptors
Global Context Descriptors for SURF and MSER Feature Descriptors
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Recently uploaded (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Deep Copy of a Linked List