Jane Street Interview Question

Standard algorithmic interview questions a bit related to time complexity analyses.