Back to problems

Smart Queue / Stock Quote Container

Algorithm · Chicago Trading · Medium

Problem: Smart Queue / Stock Quote Container Build a stock-quote container that accepts quotes in arrival order but retains no more than the newest quote associated with each stock symbol. A quote has this definition: Provide these operations: Requirements: The container may hold at most one quote for any given symbol. When push is called with a symbol already in the container, replace that symbol's quote data only. An update to an existing symbol preserves that symbol's…

Loading the rest of the question…