Back to Question
Design a Stock Price Fluctuation Tracker
Question Explain
Design a data structure that allows you to record a new stock price and immediately retrieve the maximum, minimum, and current price in $O(1)$ time. Use two heaps and a single variable.
Start Trying This Question Simulation
Click "Start Speaking" and answer the question naturally.