Pregunta de entrevista de JellyFish Technologies

How would you approach this given problem?