AI-Assisted Coding Round 1:
StockExchange class manages the _orderbook that's a dict map ticker(string) to list of Orders (Order objs). Sell sells stock with given quantity and given price and add order to order book by ticker. Buy buys cheapest stock for a given quantity.
Asked to find & fix the bug in the system. Need to generate your own test cases and be able to explain reasonings behind your code and discuss data structure choices and runtime.
. Recommended approach, before making any code changes, ask the AI to map entities in the system and the flow between them and system components. This could help you understand the codebase better.