Jane Street Interview Question

Use recursive functions and data to implement an API