Prepping for the 2027 recruiting cycle? Use code 2027RC for 10% off, valid until July 31st! Oh, and check out our members-only recruitment services.

Logo

A/B Arbitrage

What this preview is

A/B Arbitrage is a easy quant coding problem on language knowledge in Cpp, asked at Quant.

Difficulty
Easy
Topic
Language Knowledge
Discipline
Quant development
Language
Cpp

C++ coding problem: merging dual market-data feeds with minimal latency

This is an easy C++ coding problem designed to test your ability to consume and synchronize dual redundant data streams in a quantitative trading environment. It mirrors a real workflow at high-frequency trading firms, where microseconds matter and exchange feeds occasionally lag or drop packets.

The core challenge is to pull packets from two asynchronous sources, track them by sequence number, and emit an "earliest actionable stream" that always picks the fastest arrival for each sequence. You must handle missing packets, stream outages, tie-breaking rules, and the constraint that your output must be maximal—excluding no valid sequence numbers simply because one feed delivered them early. The solution rewards careful state management and clear handling of edge cases over raw performance.

  • Merging multiple ordered streams
  • Sequence numbering and gap handling
  • Priority queues and comparators
  • Stream synchronization logic

Unlock full access to getcracked

Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.