Message Streams and Logs
Market data reaches a trading system in packets, and they don't always arrive in order. Optiver's assessment puts that job into other settings, where pieces arrive shuffled, expire after a while, or come mixed in with pieces of other messages.
Each problem here is a class that gets one event per call. Decide what you buffer before you write a method, then find the exact call where an answer becomes known, because the hidden tests check that call. If you print a message one sample late, the test fails even with the right text.
The visible tests on HackerRank are few, and most edge cases sit in tests you can't see. Before you code, list the odd inputs the spec allows, like an event stamped earlier than the newest one or a late piece for a message that's already decided. Then trace each one by hand against your design.
OptiverPremium lesson · Coding round
The 3 Optiver problems are below.
- A Premium questionCoding · Hard · Signature problem
- A Premium questionCoding · Medium
- A Premium questionCoding · Hard
Each with hints, the follow-up and a tested solution.
Get the Optiver questions$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
Optiver interview guideKnow what Optiver asks before you walk in.
21 coding · 2 system design · 19 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.