Pregunta de entrevista de Quora, Inc.

Optimization function for recommendation system.