Coinbase interview question

implementing a stock buy/sell program