How would you implement a trade matching engine? The API for it should support: * adding Buy/Sell orders (these methods should return a Trade if an existing order matches the new one), * deleting pending orders * getting market depth/demand (i.e. range of buy/sell prices and total volume of pending orders at each price).
Check out your Company Bowl for anonymous work chats.