Let’s say you have a bookshelf, and a list of all the titles/locations of the books on the shelf.
When you create a shallow copy, you’re copying the list of titles/locations of the books.
When you create a deep copy, you’re copying the list but ALSO the bookshelf and the books on it.
The former is quick and doesn’t require much space at all to make the copy. The latter is much more labor-intensive and needs lots more space for everything.
Really depends on how important certain factors are like speed/time/memory available…
Latest Answers