Design an Event Recommendation Engine

Read the full interview experience this question came from →

Quick Overview

This question evaluates object-oriented design, system extensibility, interface and responsibility definition, and integration with external services in the context of a recommendation engine.

Design an Event Recommendation Engine

Company: StubHub

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

You are building an email marketing recommendation engine for a ticketing marketplace. The marketplace has many users and many events. The engine should select which events are relevant to each user and send recommendation emails. The design should be extensible because product managers will frequently add new recommendation rules. Requirements: 1. Define basic data models for `User` and `Event`. 2. Implement an `EmailMarketingEngine` that takes a list of recommendation strategies and uses them to decide which users should receive which event recommendations. 3. Implement at least the following strategies: - Recommend events in the same city as the user. - Recommend events whose ticket price is below `$50`. 4. Assume event prices are retrieved through a separate `PriceService` rather than stored directly on the event. 5. The design should make it easy to add future strategies, such as location distance, user interests, past purchases, event popularity, or personalized ranking. 6. Show how the engine can be configured with multiple strategies, for example: city-based recommendation plus price-based recommendation. Discuss the object-oriented design, interfaces, responsibilities, and how you would test the solution.

Overview: This question evaluates object-oriented design, system extensibility, interface and responsibility definition, and integration with external services in the context of a recommendation engine.

Read the full StubHub Software Engineer interview experience this question came from

|Home/Software Engineering Fundamentals/StubHub
StubHub logo
StubHub
Mar 28, 2026
mediumSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
5
0

You are building an email marketing recommendation engine for a ticketing marketplace.

The marketplace has many users and many events. The engine should select which events are relevant to each user and send recommendation emails. The design should be extensible because product managers will frequently add new recommendation rules.

Requirements:

  1. Define basic data models for User and Event .
  2. Implement an EmailMarketingEngine that takes a list of recommendation strategies and uses them to decide which users should receive which event recommendations.
  3. Implement at least the following strategies:
    • Recommend events in the same city as the user.
    • Recommend events whose ticket price is below $50 .
  4. Assume event prices are retrieved through a separate PriceService rather than stored directly on the event.
  5. The design should make it easy to add future strategies, such as location distance, user interests, past purchases, event popularity, or personalized ranking.
  6. Show how the engine can be configured with multiple strategies, for example: city-based recommendation plus price-based recommendation.

Discuss the object-oriented design, interfaces, responsibilities, and how you would test the solution.

Loading comments...