Pregunta de entrevista de Hudson River Trading

Probabilities, algorithm