Topic: Stack Problem / Level: intermediate

Problem: Write a program to implement a stack that supports both push and pop in O(1) time, and find the median in O(1).

Run the code to see the output here...