Jane Street Interview Question

question had three parts, didn't run code