PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/StubHub

Build Event Notification Engine

Last updated: Apr 20, 2026

Quick Overview

This question evaluates a candidate's competency in modular software design and extensibility, algorithmic filtering and ranking, date arithmetic for birthday proximity, geospatial distance computation, and integration with notification services.

  • medium
  • StubHub
  • Coding & Algorithms
  • Software Engineer

Build Event Notification Engine

Company: StubHub

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

You are implementing part of a marketing engine for an event marketplace. Assume the following data is available: - `Customer`: `id`, `city`, `birth_month`, `birth_day`, `latitude`, `longitude` - `Event`: `id`, `title`, `city`, `start_time`, `latitude`, `longitude` - `NotificationService.send(customer_id, message)` sends a notification to a customer Implement a `MarketingEngine` with a method such as `send_customer_notifications(customer, events, today)`. The engine should support multiple campaigns: 1. Notify the customer about all upcoming events in the same city as the customer. 2. Notify the customer about the single upcoming event whose date is closest to the customer's next birthday after `today`. 3. Notify the customer about the 5 upcoming events closest to the customer by geographic distance. For this interview, you may use Euclidean distance on latitude and longitude. Design the code so that new campaigns can be added without changing the core engine. Also explain how you would handle ties, fewer than 5 matching events, and notification formatting.

Quick Answer: This question evaluates a candidate's competency in modular software design and extensibility, algorithmic filtering and ranking, date arithmetic for birthday proximity, geospatial distance computation, and integration with notification services.

Related Interview Questions

  • Design Composable Event Recommendations - StubHub (medium)
StubHub logo
StubHub
Feb 16, 2026, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
14
0

You are implementing part of a marketing engine for an event marketplace.

Assume the following data is available:

  • Customer : id , city , birth_month , birth_day , latitude , longitude
  • Event : id , title , city , start_time , latitude , longitude
  • NotificationService.send(customer_id, message) sends a notification to a customer

Implement a MarketingEngine with a method such as send_customer_notifications(customer, events, today).

The engine should support multiple campaigns:

  1. Notify the customer about all upcoming events in the same city as the customer.
  2. Notify the customer about the single upcoming event whose date is closest to the customer's next birthday after today .
  3. Notify the customer about the 5 upcoming events closest to the customer by geographic distance. For this interview, you may use Euclidean distance on latitude and longitude.

Design the code so that new campaigns can be added without changing the core engine. Also explain how you would handle ties, fewer than 5 matching events, and notification formatting.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More StubHub•More Software Engineer•StubHub Software Engineer•StubHub Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.