Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Implement a trading system that matches buy orders to the cheapest available inventory item per product name.
Maintain persistent state across batch calls where matched items become permanently unavailable.
Enable fast minimum-price retrieval and efficient status updates without rescanning the full inventory.
What This Tests
Priority Queue management for efficient minimum retrieval
State persistence and synchronization across sequential method calls
Lazy deletion strategies for handling outdated data structure entries
Object reference handling versus value copying during updates
Common Patterns
Heap / Priority Queue
Hashing
Collapse
Hint 1
Hint 2
Hint 3
What Interviewers May Ask Next
Report
Report seen similar question in interview
Accepted
26
/240
Acceptance Rate
10.8%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Python3
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected