AlgoMaster Logo

Stock Price Fluctuation

operations=[StockPrice, update, update, current, maximum, update, minimum],values=[null, 1,10, 2,5, null, null, 1,3, null]
0 / 29
Operation
Result
Latest Timestamp
Timestamp → Price (HashMap)TimestampPrice(empty)Price → Count (Sorted TreeMap)(empty)
algomaster.io
Step:Initialize StockPrice with empty HashMap and TreeMap