Pergunta de entrevista da empresa Jane Street

Programming questions. I answered in python.