Pregunta de entrevista de Philips

Data structure and problem solving.