Robinhood Order Book
Also known as: Order Book with Price-Time Priority
Robinhood Order Book (Part 1) Store limit orders and query best bid/ask. DO NOT match orders in Part 1. add_limit_order(id, side, price, qty) -> str (fills, or "" if none) get_best_bid() -> str ("null" or price) get_best_ask() -> str ("null" or price)
Implement an order book with limit/market orders, price-time priority matching, partial fills, and cancellation. Outputs are deterministic and easy to audit.

Meet Coco
Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Sign in free to type with Coco, up to a daily limit, and to talk with her for one hour. After that, talking comes with the $79 pack. Anyone can open the editor and run their code.
Each locked part opens in the editor once the part before it passes.