← Back to blog Optiver OA Key Questions: How to Solve Them Fast
Optiver

Optiver OA Key Questions: How to Solve Them Fast

2026-06-09

As a top market maker, Optiver's OA looks nothing like a typical internet company's: it tests both algorithm implementation and your intuition for probability and market mechanics. This article focuses on the three highest-frequency types, with an emphasis on "how to find the optimal solution under the clock."

Optiver OA Overview

Dimension Detail
Platform HackerRank / CodeSignal / proprietary
Duration 60–75 minutes
Questions 2–4 (coding + mental math/probability)
Difficulty LeetCode Medium and up, thinking-heavy
Focus Simulation, expected value, greedy/optimal execution

Type 1: Market-Making Matching Simulation

Given a stream of buy/sell orders, simulate the order book matching and output trades and remaining orders. The key is to maintain both sides with two heaps.

import heapq

def match_orders(orders):
    buy = []   # max-heap (store negative price): higher bids first
    sell = []  # min-heap: lower asks first
    trades = []
    for side, price, qty in orders:
        if side == 'BUY':
            while qty > 0 and sell and sell[0][0] <= price:
                sp, sq = heapq.heappop(sell)
                traded = min(qty, sq)
                trades.append((sp, traded))
                qty -= traded
                if sq > traded:
                    heapq.heappush(sell, (sp, sq - traded))
            if qty > 0:
                heapq.heappush(buy, (-price, qty))
        else:
            while qty > 0 and buy and -buy[0][0] >= price:
                bp, bq = heapq.heappop(buy)
                traded = min(qty, bq)
                trades.append((-bp, traded))
                qty -= traded
                if bq > traded:
                    heapq.heappush(buy, (bp, bq - traded))
            if qty > 0:
                heapq.heappush(sell, (price, qty))
    return trades

Time complexity: O(n log n). Hint: "matching / order book" should immediately suggest two heaps.

Type 2: Probability and Mental Math

Optiver loves expected-value problems, like "roll a die until a 6 appears — expected number of rolls?" Coded versions ask you to simulate or compute closed-form.

def expected_rolls_until(target_faces, sides=6):
    # geometric distribution expectation = 1 / p, p = target_faces / sides
    p = target_faces / sides
    return 1 / p

Hint: First check whether it follows a geometric distribution or linearity of expectation; most don't require actual simulation.

Type 3: Optimal Execution / Greedy

"Sell N shares over T time steps, each with a different price, maximize revenue." Essentially a constrained greedy or DP.

def max_revenue(prices, shares, per_step_limit):
    # sell at high-price steps first, bounded by per-step limit
    revenue = 0
    remaining = shares
    for price in sorted(prices, reverse=True):
        sell = min(remaining, per_step_limit)
        revenue += sell * price
        remaining -= sell
        if remaining == 0:
            break
    return revenue

Time complexity: O(n log n).

Time-Allocation Strategy

The Optiver OA is tight. Scan all questions first, prioritize mental-math/probability (short, high certainty), then attack the coding simulation, and leave the most time-consuming optimal-execution problem for last.


FAQ

How hard is the Optiver OA? Coding is LeetCode Medium and up, but the real difficulty is probability and market-intuition questions, which need math thinking rather than pure grinding.

What platform and duration? Usually HackerRank/CodeSignal or proprietary; 60–75 minutes, 2–4 questions, coding plus mental math/probability.

Is the SWE OA the same as the Trader OA? Not entirely. SWE leans coding simulation; the Trader role weighs mental math and probability more heavily and is more time-pressured.

What if I can't do the mental-math questions at all? We provide Optiver OA support: targeted training on mental math, expected value, and market-making simulation to build fast pattern-recognition reflexes.


Preparing for the Optiver OA?

The Optiver OA is all about speed: identify the pattern and apply the right model in seconds. Our mentors offer targeted breakdowns of market-making simulation, expected value, and optimal execution. For a systematic plan, reach out — contact WeChat Coding0201 to get real questions and prep materials.


Contact

Email: [email protected] Telegram: @OAVOProxy