Pregunta de entrevista de Sensation Software Solutions

Data structure and algorithms question