Pregunta de entrevista de Jane Street

Math problems, probability and some brain teasers.