Jane Street interview question

Coding a calculator program.