← Citadel Interview Insights

Citadel·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Citadel software engineer round, started with the usual intros and then jumped straight into pair coding. The problem was an order book design, which felt pretty standard for a trading firm but still required some careful thinking about constraints.

Questions Asked (1)

Q1

Design and implement a traditional order book system.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

Spent a bit of time upfront clarifying what they actually wanted before touching any code, which felt right.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (e.g., asset type, order types, throughput, latency) and then design a data structure that supports efficient add, cancel, and match operations. Implement the core matching engine using price-time priority, and discuss trade-offs between different data structures and concurrency models.

Pro tip: Emphasize the importance of deterministic behavior and low-latency, and mention how you would handle high availability and fault tolerance, as these are critical in trading systems.

1. Clarify Requirements

Ask about expected order types (limit, market, etc.), throughput, latency requirements, and whether the system needs to support multiple assets. This ensures the design meets the actual needs.

2. Design Data Structures

Choose appropriate data structures for the order book, such as a combination of a hash map for order lookup and a sorted structure (e.g., balanced BST, skip list, or array of price levels) for each side. Explain how to maintain price-time priority.

3. Implement Matching Logic

Describe the matching algorithm: when a new order arrives, match against the opposite side while prices cross, following price-time priority. Handle partial fills and order cancellations efficiently.

4. Address Concurrency and Performance

Discuss how to handle concurrent access (e.g., single-threaded event loop, locking, lock-free structures) and optimize for low latency. Mention techniques like memory pooling and cache-friendly data layouts.

5. Discuss Trade-offs and Extensions

Compare alternative designs (e.g., using a heap vs. sorted list) and their trade-offs in terms of time complexity, memory, and ease of implementation. Also mention how to extend the system for features like market data publishing and persistence.

Key Points to Mention

  • Price-time priority (FIFO within same price level)
  • Data structures: hash map for order ID lookup, doubly linked list for price levels, balanced BST or skip list for sorted price levels
  • Time complexity: O(1) for cancel, O(log n) for add/match in balanced BST, O(1) amortized for array-based price levels
  • Concurrency: single-threaded matching engine for determinism, or lock-free structures for high throughput
  • Latency optimization: avoid dynamic memory allocation, use ring buffers, cache-friendly data structures
  • Fault tolerance: replication, snapshotting, and recovery mechanisms

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.