Implement a weak-reference collection that conforms to Collection
Task
Write a generic collection that holds objects weakly and still fully conforms to Collection — so for-in, map, filter, count, first etc. all work.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep