Data Structures

What is the difference between a shallow copy and a deep copy?

Hard
9
Added
A shallow copy creates a new object but does not copy the nested objects. A deep copy creates a new object and recursively copies all nested objects.