R copy-on-modify semantics: when copies actually happen and how they affect performance and memory
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how R's copy-on-modify semantics work, when R actually duplicates an object, and what that costs in time and memory. Tests understanding of shared bindings, modify-in-place, data frame and list copies, and how to detect and avoid unnecessary copies in R code.