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