Pregunta de entrevista de Comcast

some questions regarding algorithm design