Parallel loading with request deduplication and preserved order
Task
You have a list of image URLs (possibly with duplicates). You must:
- Load them in parallel.
- Download the same URL only once, even if it's requested concurrently from different places.
- Return the results in the original order.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep