
v0.39: Grademe is back in your terminal.
Try the CLI betaInsert a bid into a book sorted from the highest price down, and report where it landed.
May 18, 2012. Facebook goes public and Nasdaq's opening cross keeps restarting, because orders keep arriving while it recalculates. The book it was matching against was already stale by the time it finished. Trading opens half an hour late. Confirmations vanish for hours, and market makers eat around 500 million dollars. The book has to stay sorted at every single insertion, not once at the end.
insert_order({90,70,50}, 3, 80)Expected result
book 90 80 70 50, returns 1For your own tracking. Tests grade your code.
insert_order({90,70,50}, 3, 90)Expected result
book 90 90 70 50, returns 1insert_order({}, 0, 42)Expected result
book 42, returns 0Expected files
book.cAllowed functions
None. Write every helper yourself.
