Problem Statement
Which mechanism underpins the performance optimisation for many Swift value types such as Array, when multiple copies appear but actual duplication is delayed until needed?
Explanation
Many Swift value types (e.g., Array, Dictionary) use Copy on Write (COW) under the hood: multiple variables may share storage until a mutation forces duplication, improving performance while preserving value semantics. This detail is often asked in interviews.
Practice Sets
This question appears in the following practice sets: