Two Sigma Interview Question

HackerRank-style problems.