A stream of price records arrives, possibly out of order and possibly correcting an earlier record. Build a StockPrice class.
update(timestamp, price) records the price at that timestamp. If a record for that timestamp already exists, the new price replaces itcurrent() returns the price at the latest timestamp recorded so farmaximum() and minimum() return the highest and lowest price among the current records (replaced prices no longer count)- The first call is always
update, so the others are never called on an empty record - Prices and timestamps are positive integers; many timestamps can have equal prices