Implement ad matching and delivery routing | Amazon Interview Question