Algorithm · Lead Bank · Medium
Problem: In-Memory Stock Price Store with Updates and Percentage Changes Build an in-memory stock-price store from records formatted as (ticker, date, price). A given (ticker, date) combination corresponds to one final price. The system must provide: get(date, ticker='SQ'): Retrieve the price, returning None when no matching entry exists. When update has overwritten the entry, append " (updated)" to its value. update(date, ticker, price): Replace the price when the entry…