Pregunta de entrevista de Wayfair

Recommendation system. Fruit coding problem.