Quick Summary
- Simulate a sequential trading system processing buy/sell orders starting with $1000 in cash.
- Enforce collateral requirements where special stocks (ending in 'O') mandate holding their underlying regular stock before purchase.
- Trigger automatic liquidations when cash turns negative, prioritizing highest-value assets while respecting tie-breakers and cross-sell restrictions.
What This Tests
- Stateful simulation and transaction processing
- Greedy selection strategies for asset liquidation
- Hash-based portfolio management and lookups
- Complex sorting with multiple criteria
- Constraint satisfaction in financial logic
Common Patterns
Greedy
Hashing
Sorting
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected