Pregunta de entrevista de KPIT Technologies

How would you approach this problem?