Jane Street Interview Question

Implement custom stack with various operations on it.