Optiver Software Engineer Interview Experience โ€” HackerRank OA: News Subscription System Design

Company: Optiver

Role: Software Engineer

Round: Online Assessment

Seniority: General

โœ… Interview experience summary: News Subscription System design (hands-on HackerRank question) ๐Ÿ“Œ Problem background (system design) You're a news aggregation service. The goal is to give users one unified system for subscribing to all news providers, so they only receive content they're interested in without being overloaded with volume. The system needs to manage large data streams efficiently and robustly, and support user-customized subscriptions. System requirements: - Each subscriber (subscriber) can subscribe to multiple topics - Users set a minimum interest score (minInterest) โ€” news below this score won't be delivered to them - Users also set a maximum receive rate (maxNewsPerSecond) โ€” the max number of news items they'll get per second, based on a rolling time window - Each news item carries metadata: timestamp, topic, interest score, etc. ๐Ÿง  Core design goals Implement a class NewsProvider supporting the following operations: AddSubscription(id, minInterest, maxNewsPerSecond, topics) -> bool - Add or update a subscription - Supports updating an existing subscription with the same ID - Returns true on success, false if constraints are violated (e.g. invalid input) RemoveSubscription(id) -> bool - Remove a subscription, returns true on success - Returns false if the id doesn't exist NewsReceived(id, timestamp, interest, topics) -> bool - Add a news item, recording its time, interest score, and topics - Returns false if the id is a duplicate (the news item already exists) - Returns true if it's added successfully Publish(timestamp, maxAge) -> dict[int, list[int]] - For each subscriber, publish the news items that qualify as of the current timestamp - Returns a dict mapping each subscriber id to the list of news ids they can receive Publishing rules: - The news item's interest score >= the subscriber's minimum score - The news item's topics intersect with the subscriber's topics of interest - The news item falls within maxAge (current timestamp - maxAge <= news timestamp <= timestamp) - Rolling window limit: each subscriber can receive at most maxNewsPerSecond news items per second - The same news item must never be sent to the same subscriber more than once - Higher-interest-score news goes out first; ties are broken by older timestamp first, then by ID ๐Ÿ“ Technical focus points and difficulty | Point | What it involves | |---|---| | Data structure design | Use a dict for subscriber info, a set/dict to dedupe news IDs, a queue or time series to support rolling-window stats | | Time window handling | maxNewsPerSecond is based on a rolling (sliding) window โ€” every publish call has to look backward from the given timestamp | | Sort strategy | publish has to sort primarily by interest score, then by time, then by ID โ€” this means a custom comparator | | Duplicate handling | No news item can be sent twice; you need to track which news IDs each subscriber has already received | ๐Ÿ’ฌ My take as the candidate Difficulty: โญโญโญโญโญ (system design + implementation detail + multiple combined constraints) What it's testing: - Building the core of a high-performance subscription system - Rate-limiting with a sliding time window - Deduplication and merge logic - Implementing a multi-level sort order - Handling edge cases correctly in the implementation What I'd suggest preparing: - Be comfortable combining sliding window + heap + hash map - Understand how to implement a topic-based routing/filtering system - Be able to quickly build a data model that satisfies all the constraints

Optiver Software Engineer Interview Experience โ€” HackerRank OA: News Subscription System Design

OptiverยทSoftware EngineerยทAug 2026
Online Assessmenthard

โœ… Interview experience summary: News Subscription System design (hands-on HackerRank question)

๐Ÿ“Œ Problem background (system design)

You're a news aggregation service. The goal is to give users one unified system for subscribing to all news providers, so they only receive content they're interested in without being overloaded with volume. The system needs to manage large data streams efficiently and robustly, and support user-customized subscriptions.

System requirements:

  • Each subscriber (subscriber) can subscribe to multiple topics
  • Users set a minimum interest score (minInterest) โ€” news below this score won't be delivered to them
  • Users also set a maximum receive rate (maxNewsPerSecond) โ€” the max number of news items they'll get per second, based on a rolling time window
  • Each news item carries metadata: timestamp, topic, interest score, etc.

๐Ÿง  Core design goals

Implement a class NewsProvider supporting the following operations:

AddSubscription(id, minInterest, maxNewsPerSecond, topics) -> bool

  • Add or update a subscription
  • Supports updating an existing subscription with the same ID
  • Returns true on success, false if constraints are violated (e.g. invalid input)

RemoveSubscription(id) -> bool

  • Remove a subscription, returns true on success
  • Returns false if the id doesn't exist

NewsReceived(id, timestamp, interest, topics) -> bool

  • Add a news item, recording its time, interest score, and topics
  • Returns false if the id is a duplicate (the news item already exists)
  • Returns true if it's added successfully

Publish(timestamp, maxAge) -> dict[int, list[int]]

  • For each subscriber, publish the news items that qualify as of the current timestamp
  • Returns a dict mapping each subscriber id to the list of news ids they can receive

Publishing rules:

  • The news item's interest score >= the subscriber's minimum score
  • The news item's topics intersect with the subscriber's topics of interest
  • The news item falls within maxAge (current timestamp - maxAge <= news timestamp <= timestamp)
  • Rolling window limit: each subscriber can receive at most maxNewsPerSecond news items per second
  • The same news item must never be sent to the same subscriber more than once
  • Higher-interest-score news goes out first; ties are broken by older timestamp first, then by ID

๐Ÿ“ Technical focus points and difficulty

PointWhat it involves
Data structure designUse a dict for subscriber info, a set/dict to dedupe news IDs, a queue or time series to support rolling-window stats
Time window handlingmaxNewsPerSecond is based on a rolling (sliding) window โ€” every publish call has to look backward from the given timestamp
Sort strategypublish has to sort primarily by interest score, then by time, then by ID โ€” this means a custom comparator
Duplicate handlingNo news item can be sent twice; you need to track which news IDs each subscriber has already received

๐Ÿ’ฌ My take as the candidate

Difficulty: โญโญโญโญโญ (system design + implementation detail + multiple combined constraints)

What it's testing:

  • Building the core of a high-performance subscription system
  • Rate-limiting with a sliding time window
  • Deduplication and merge logic
  • Implementing a multi-level sort order
  • Handling edge cases correctly in the implementation

What I'd suggest preparing:

  • Be comfortable combining sliding window + heap + hash map
  • Understand how to implement a topic-based routing/filtering system
  • Be able to quickly build a data model that satisfies all the constraints
Curated and edited by PracHub

Practice the questions from this interview

Optiver Software Engineer Interview Experience โ€” HackerRank OA: News Subscription System Design | Optiver Interview Experience