AmazonOA #65
Get Unfulfilled Customers (Auction Allocation)
Estimated MediumStatement and editorial — judging is being prepared
Topics (AI-labelled)SimulationGreedy
requests = [[customerId, quantity, bidAmount, timestamp], ...], total inventory T. Allocate by descending bid; on tie, round-robin by ascending timestamp. Return IDs of customers who get nothing, sorted ascending.
Constraints
1 ≤ n ≤ 10⁴1 ≤ customerId, quantity, bidAmount, timestamp, totalInventory ≤ 10⁸
Example
requests = [[1, 5, 5, 0], [2, 7, 8, 1], [3, 7, 5, 1], [4, 10, 3, 3]]
totalInventory = 18
answer = [4]
Editorial
Loading solution…