Pregunta de entrevista de Ritual

Basic algorithm and data structure question and white boarding.