Design a stack that pushes integers and pops the most frequent element, breaking ties by removing the one closest to the top of the stack.
Loading content...