Implement a debouncer with DispatchWorkItem
Task
A debouncer delays an action by delay and cancels the previous one if a new call arrives earlier. The classic: search-as-you-type — the request goes out only after a pause in typing. Implement it with DispatchWorkItem, then show the modern version.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep