ZeroStack Interview Question

One algorithm/design question