New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
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
3.3k
/7.2k
Acceptance Rate
46.0%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.7-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
orders =
Output
Expected