there are some things in Jainee's editOrder function that are not compiling on my end, not sure if that's just a me thing. otherwise here is where each implementation is in my code.
findOrderInBookByOrderId looks up through a map so this should be constant look-up
sortedPricePendingOrders is a queue with prices sorted small->large
findHighestBuy and findLowestSell return the best limit orders in constant time
edit order should do fast quantity updates with by setting volume
there are some things in Jainee's editOrder function that are not compiling on my end, not sure if that's just a me thing. otherwise here is where each implementation is in my code.
findOrderInBookByOrderId looks up through a map so this should be constant look-up sortedPricePendingOrders is a queue with prices sorted small->large findHighestBuy and findLowestSell return the best limit orders in constant time edit order should do fast quantity updates with by setting volume