Bifalgorithm post · Computer science one · Factory Functions
How should a copied structure avoid sharing references?
How should a copied structure avoid sharing references? (Computer science one · Factory Functions) — "Another common operation is to create a copy of a given s…
Ideas in this flowchart
- Create a copy of a given structure
- The given structure serves as the source for the copy.
- The copy must be a deep copy.
- The two structures do not share references.
- Reuse the functionality previously written in the factory.