Pregunta de entrevista de Jane Street

To code a solution to a problem.