Google | Stock stat from stock data stream
Anonymous User
1483

Process a stream of stock information which allow querying of the stock stat information.
Input: <Stock Symbol, Timestamp, Stock Price>
Output: For a given Stock Symbol
<Stock Symbol, Current Stock Price, 52-Week High, 52-Week-Low>

Note: You can assume the timestamp in the Epoch Millisecond format if you wish.

Example:
Input Stream:
ABC, 17-July-2019 10:15:12, 12.87
XYZ, 17-July-2019 10:16:12, 22.87
XYZ, 18-July-2019 10:17:12, 25.87
ABC, 18-July-2019 10:18:12, 11.87
PQR, 18-July-2019 10:19:12, 50.87

Query:
ABC: ABC, 11.87, 12.87, 11.87
XYZ; XYZ, 25.87, 25.87, 22.87
PQY: PQR, 50.87, 50.87, 50.87

Comments (3)