Design stack with O(1) minimum query | Anthropic Interview Question