InterviewLegend

Message Streams and Logs

Alex Chen45 min readUpdated 63 real interview reports

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.

  1. A Premium questionCoding · Hard · Signature problem
  2. A Premium questionCoding · Medium
  3. 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.

Had your Optiver interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Optiver interview guide

Know what Optiver asks before you walk in.

21 coding · 2 system design · 19 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.