← Optiver Interview Insights

Optiver·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jul 2026

Summary

Optiver system design round for a software engineering role. The problem was a full news subscription service, end to end, and they wanted data structures, algorithms, complexity analysis, and a scaling discussion all in one shot. Dense problem, not much hand-holding.

Questions Asked (1)

Q1

Design and implement a topic-based news subscription service. The class needs to support adding/updating subscriptions, removing them, ingesting news items, and a Publish method that delivers news to subscribers with filtering, rate limiting, deduplication, and multi-key ordering. Walk through your data structures, algorithms, complexity, and how you'd scale this to millions of users.

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

This is a lot.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a modular design separating subscription management, news ingestion, and delivery. For each component, discuss data structures (e.g., hash maps, inverted indices, heaps) and algorithms (e.g., filtering, rate limiting, deduplication, ordering), analyzing time/space complexity. Finally, outline a scalable architecture using sharding, caching, and message queues to handle millions of users.

Pro tip: Emphasize trade-offs: for example, using a priority queue for ordering adds O(log n) insertion but enables efficient retrieval; deduplication via Bloom filters saves memory at the cost of false positives. Show awareness that at scale, you'd likely use distributed systems like Kafka and Redis rather than building everything from scratch.

1. Clarify Requirements and Constraints

Ask about expected scale (users, topics, news volume), latency requirements, consistency needs, and whether the system is single-node or distributed. Confirm the exact semantics of operations like Publish (e.g., should it be synchronous or asynchronous?).

2. Design Core Data Structures

Propose structures for subscriptions (e.g., hash map from user to topics, and inverted index from topic to subscribers), news storage (e.g., time-ordered log), and auxiliary structures for deduplication (e.g., Bloom filter or LRU cache) and rate limiting (e.g., token bucket per user).

3. Define Algorithms for Publish

Outline the steps: filter news by topic, deduplicate, apply rate limiting, order by multiple keys (e.g., timestamp, priority), and deliver. Discuss algorithms for each: set intersection for filtering, hash-based dedup, token bucket for rate limiting, and priority queue or sorting for ordering.

4. Analyze Complexity and Trade-offs

For each operation, state time and space complexity. Discuss trade-offs: e.g., precomputing subscriber lists vs. on-the-fly filtering, exact vs. approximate dedup, and synchronous vs. asynchronous delivery.

5. Scale to Millions of Users

Describe a distributed architecture: shard subscriptions by user or topic, use a message queue (e.g., Kafka) for news ingestion, cache hot data (e.g., Redis), and employ a pub/sub system for delivery. Mention partitioning, replication, and fault tolerance.

Key Points to Mention

  • Inverted index for topic-to-subscriber mapping to enable efficient filtering.
  • Deduplication strategies: Bloom filters for space efficiency or LRU cache for exactness, with trade-offs.
  • Rate limiting using token bucket or sliding window per user, and how to handle bursts.
  • Multi-key ordering: using a priority queue or sorting with composite keys, and complexity implications.
  • Scalability: sharding, partitioning, and using distributed systems like Kafka, Redis, and Cassandra.
  • Trade-offs between consistency, latency, and cost in a large-scale system.

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