Question d’entretien chez Jane Street

Coding question, preferred written in python.