← Back to blog Optiver OA Debrief: SmartDepot Simulation + Zap-N
Optiver

Optiver OA Debrief: SmartDepot Simulation + Zap-N

2026-08-15

The Optiver OA is genuinely hard. I've also assisted with their VO, and the overall intensity is high. The OA gives 90 minutes for a single problem, but it isn't a standard LeetCode algorithm question — it leans into an engineering scenario and comprehensive implementation, so reading, modeling, and edge handling all take time. Once the requirements are clear, though, the approach and code come together quickly, and the submission went through smoothly. If you want OA assist or OA live support, you can align your pacing with this debrief.

OA Overview

Aspect Details
Format Online coding + a Zap-N game round
Time 90 minutes (coding part)
Volume 1 Medium system-simulation problem
Type Engineering-scenario implementation, not a traditional algorithm
Focus Modeling, state maintenance, edge handling

The coding part is one Medium system-simulation problem, not a traditional algorithm question.


Optiver OA Problem: SmartDepot Vertical Warehouse

Problem

Implement a SmartDepot class that simulates storing and retrieving goods in an automated vertical warehouse:

Approach

At its core this simulates the store/retrieve process:

Just simulate in timestamp order; the crux is maintaining state correctly after each operation and covering edge cases. Since weight and time carry decimals, uniformly multiply by 1000 to convert to integers before comparing, avoiding floating-point error, and validate the warehouse, item ID, capacity, and shelf life before each operation.

Python Implementation

class SmartDepot:
    """Automated vertical-warehouse simulation: shelf capacity grows 1,2,4,8...
    Weight and time are scaled by 1000 to integers to avoid float error."""

    SCALE = 1000

    def __init__(self, num_shelves):
        # per-level capacity: 1, 2, 4, 8 ...
        self.capacity = [1 << i for i in range(num_shelves)]
        # shelf[i] = list of (weight_int, id, expire_int)
        self.shelf = [[] for _ in range(num_shelves)]
        self.ids = set()                        # item IDs currently in stock

    def _to_int(self, x):
        return round(x * self.SCALE)

    def store(self, item_id, weight, expire, ts):
        """Store an item; return False if any constraint is violated. ts = timestamp."""
        if item_id in self.ids:
            return False                        # duplicate ID
        if weight <= 0 or expire < ts:
            return False                        # invalid weight / already expired
        w, e = self._to_int(weight), self._to_int(expire)
        for i in range(len(self.shelf)):        # find the lowest shelf with room
            if len(self.shelf[i]) < self.capacity[i]:
                self.shelf[i].append((w, item_id, e))
                self.ids.add(item_id)
                return True
        return False                            # all shelves full

    def retrieve(self, shelf_idx, ts):
        """Retrieve from a level: pick lightest, largest ID on tie; heaviest below moves up."""
        if shelf_idx < 0 or shelf_idx >= len(self.shelf):
            return None
        # drop expired items (shelf life earlier than current timestamp)
        t = self._to_int(ts)
        level = [it for it in self.shelf[shelf_idx] if it[2] >= t]
        if not level:
            self.shelf[shelf_idx] = []
            return None
        # lightest first; on a weight tie, largest ID first
        chosen = min(level, key=lambda it: (it[0], -it[1]))
        level.remove(chosen)
        self.shelf[shelf_idx] = level
        self.ids.discard(chosen[1])

        # heaviest eligible item from the level below moves up to fill the gap
        if shelf_idx + 1 < len(self.shelf) and self.shelf[shelf_idx + 1]:
            lower = self.shelf[shelf_idx + 1]
            heaviest = max(lower, key=lambda it: (it[0], it[1]))
            lower.remove(heaviest)
            self.shelf[shelf_idx].append(heaviest)
        return chosen[1]                        # return the retrieved item ID

Complexity: each store is O(S) where S is the number of shelf levels; each retrieve is O(L) where L is the item count on the level (for picking lightest / heaviest below). Simulating in timestamp order is O(operations x per-operation cost).

Edge-Case Checklist


Zap-N: The Reaction-Game Round

Beyond coding, the Optiver OA has a Zap-N round — game-like, with 9 mini-games (memorizing numbers, shape matching and switching, and so on) that test reaction speed, memory, and task switching.

There's no "grinding" for this round; the point is to know the format in advance and stay focused:


Prep Strategy


FAQ

Q1: How hard is the Optiver SWE OA?

Just one problem in 90 minutes, but it's not a standard algorithm question — it's a Medium system-simulation problem. The difficulty isn't in algorithmic tricks but in reading, modeling, and cleanly handling a stack of constraints (weight, shelf life, capacity, ordering); it demands a high level of meticulousness.

Q2: What's the format of the Optiver OA, and how many rounds?

Mainly coding (one system-simulation problem, 90 minutes) plus the Zap-N game round. Zap-N has 9 reaction/memory/task-switching mini-games testing overall cognitive ability, not programming.

Q3: What's the easiest trap in the SmartDepot problem?

Two: first, float precision — weight and time carry decimals, and comparing them directly is error-prone, so scale by a factor to integers; second, the "heaviest item from the level below moves up to fill the gap" logic after retrieval, which is easy to miss or reverse — sort it out together with the "lightest first, largest ID on a tie" selection rule.

Q4: Can you prepare for the Zap-N round?

You can't grind it, but you can learn the format and adjust your state ahead of time. Know roughly what the 9 mini-games test (number memory, shape matching, task switching), warm up with similar reaction games beforehand, and keep focus and a steady hand speed.

Q5: How do I prep for an engineering-heavy OA like Optiver's?

Practice system-simulation problems: model the entity relationships, operation rules, and constraints clearly before coding, and build the habits of "convert floats to integers" and "cover edges before optimizing." Optiver values engineering sense and implementation rigor over flashy algorithms.


Preparing for the Optiver SWE OA or another quant/trading firm's OA? We know the Optiver format — one 90-minute system-simulation problem plus Zap-N — and can help you nail entity modeling, constraint coverage, and float-precision handling in one pass, with full OA assist and OA live support.

Add WeChat Coding0201 now to get a one-on-one custom prep plan.

Contact