eBay·Software Engineer·Technical Phone Screen
- Implement a function that assigns ads to browser positions for a user. Inputs are a list of position strings, a list of candidate ads, and a per-user state dictionary tracking how many times each ad has been shown. The function should randomly assign ads to positions without duplicates (when supply allows), respect per-ad display limits, return the assignment, and update the state dictionary.
“The logic itself wasn't too bad to reason through.”