InterviewDB
Question
Orderbook - Implement a Limit Order Book with Matching Engine
phone
Question Details
Problem Implement a limit order book for a single trading pair. Support: place_order(order_id, side, price, quantity) - add a limit order ("buy" or "sell"). cancel_order(order_id) - remove the order. get_best_bid() -> float - highest buy price with resting quantity. get_best_ask() -> float - lowest sell price with resting quantity. Automatically match orders when best bid >= best ask. Example: Follow-ups What data structures give O(log n) insert/delete and O(1) best-bid/ask lookup? How do you ha…
Full Details
🔒
Unlock all Two Sigma questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a reported interview question from a two sigma interview during the phone round.
It covers the following topics: Coding, Queue, Phone, Onsite .
More Two Sigma Interview Questions
1p3a
Two Sigma Quant Research Intern Onsite Interview Experience and Insights
1p3a
Two Sigma Quant Finance Intern Tech Phone Screen Interview Experience
1p3a
Twosigma QSE/SWE Interview Process for General Hiring
LeetCode
Two Sigma | Quantitative Software Engineer | Apr 2020 [Reject]
LeetCode
#43 Multiply Strings