Pregunta de entrevista de Jump Trading

General programming and probability questions. Nothing unexpected