100xdevs-cohort-2 / week-30-orderbook-1

18 stars 23 forks source link

Fix orderbook numbering/totalling issue. Reduce time complexity of getting correct sequence of orders. #3

Closed prateekkumaroriginal closed 3 months ago

prateekkumaroriginal commented 3 months ago

Fixes #4

Reduced time complexity:- Bids: From O(n/2) to O(1) Asks: From O(2n) to O(n)

prateekkumaroriginal commented 3 months ago

@hkirat Please review this.

hkirat commented 3 months ago

Looks great Will review if I get the time but looks like it's in the right direction