Pregunta de entrevista de WorldQuant

Various algorithmic questions, not too difficult.