Jane Street Interview Question

Specifically, it was a problem involving stacks.