Pregunta de entrevista de Phenom

Data structure and algorithms question