New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Robinhood
Coding Question
AI Insights
Quick Summary
Simulate an order matching engine processing sequential buy and sell requests.
Match orders based on price constraints while prioritizing the best available prices.
Handle partial fills and accumulate the total number of successfully traded shares.
What This Tests
Priority Queue manipulation
Greedy matching strategies
State management with partial execution
Data structure selection for optimal performance
Common Patterns
Heap / Priority Queue
Greedy
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
2.9k
/5.8k
Acceptance Rate
49.6%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
orders =
Output
Expected