Reported interview periodAug 2026–Sep 2026
Leased Work Queue with Dead-Letter Handling
Implement an in-memory queue whose jobs are reserved with expiring leases. A failed worker must not hold a job forever, and jobs that exceed their retry budget move to a dead-letter state.
Practice focusRequirements and assumptions - Jobs move among ready , reserved , completed , and dead . - reserve increments attempts and returns {item id, token} plus an internal deadline. - On explicit failure or lease deadline <= now , return the job to ready unless attempts reached max attempts ; then mark it dead. - Completion or failure with a stale token returns False without changing state. - Queue ready jobs deterministically and reject duplicate active IDs. - Validate positive limits and use the explicit clock supplied by callers. Follow-ups 1.…