Pregunta de entrevista de Jane Street

Dynamic programming and expected value