← stubhub Interview Insights

stubhub·Software Engineer·Onsite - Coding / Algorithms·Intermediate

Intermediate
Apr 2026

Summary

StubHub coding round for a Software Engineer role. The whole thing was a design exercise around an Event Recommendation System, and the main constraint was no hardcoded logic. Interesting problem but it pushed you to think in composable patterns pretty fast.

Questions Asked (2)

Q1

Design an Event Recommendation System that supports composable filtering behaviors (by distance, price, time, etc.) across different campaign types, without hardcoding any conditional logic.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

They gave you starter code with Event, Customer, Inventory, and Coordinates classes plus a few services, and the whole point was to not reach for if-else chains.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a design that models each filter as an independent, composable predicate (e.g., using the Specification or Strategy pattern) and chains them via a pipeline or composite structure. Explain how this avoids hardcoded conditionals, supports dynamic campaign configurations, and discuss trade-offs like performance, extensibility, and maintainability.

Pro tip: Emphasize that composable filters should be data-driven and configurable at runtime, enabling new campaign types without code changes—this shows you think beyond just design patterns to real-world operational flexibility.

1. Clarify Requirements and Constraints

Ask about scale (events, users, QPS), latency requirements, filter types, and how campaigns are defined. Confirm that 'no hardcoded conditional logic' means filters must be dynamically composable and configurable.

2. Design Core Abstractions

Define a Filter interface with a method like `boolean matches(Event event, User user)`. Implement concrete filters (DistanceFilter, PriceFilter, TimeFilter) and a CompositeFilter that combines them using logical operators (AND, OR, NOT).

3. Enable Dynamic Composition

Use a builder or factory to construct filter chains from campaign configuration (e.g., JSON or database). Explain how this allows new campaign types to be added without modifying existing code, adhering to the Open/Closed Principle.

4. Address Performance and Scalability

Discuss indexing (e.g., geospatial, time-based), caching, and parallel evaluation of filters. Consider pre-filtering with cheap filters before expensive ones, and using approximate algorithms for distance if needed.

5. Discuss Trade-offs and Extensions

Compare patterns (Specification vs. Strategy vs. Chain of Responsibility), and discuss trade-offs between flexibility, complexity, and performance. Mention how to handle filter priority, short-circuiting, and monitoring.

Key Points to Mention

  • Specification pattern or Strategy pattern to encapsulate filter logic
  • Composite pattern to combine filters with AND/OR/NOT semantics
  • Data-driven configuration (e.g., JSON) to define campaign filter chains
  • Open/Closed Principle: adding new filters without modifying existing code
  • Performance optimizations: indexing, caching, parallel evaluation, short-circuiting
  • Trade-offs: flexibility vs. complexity, runtime overhead, and testability

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

Q2

How would you ensure users always receive event recommendations even when there's limited signal or data available about them?

Product Sense & IdeationAdaptability & AmbiguitySystem Design
Author's notes

This came as a follow-up and I wasn't fully prepared for it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scenario and defining what 'limited signal' means, then propose a tiered fallback strategy that leverages available data, contextual signals, and popular/trending events. Emphasize a system design that gracefully degrades and continuously learns from user interactions to improve recommendations over time.

Pro tip: Highlight the importance of measuring the quality of recommendations even with limited data, and suggest A/B testing fallback strategies to ensure they don't harm user engagement. Show awareness of business metrics like conversion and retention, not just technical robustness.

1. Clarify the problem and constraints

Ask questions to understand what 'limited signal' means (e.g., new user, anonymous user, sparse history) and what data is available (e.g., location, time, device, event popularity). Define success metrics such as click-through rate or conversion.

2. Design a tiered recommendation strategy

Propose a hierarchy of recommendation sources: personalized based on user history, then segment-based (e.g., similar users), then contextual (e.g., location, time), and finally global popularity/trending. Ensure each tier has clear fallback logic.

3. Leverage contextual and implicit signals

Explain how to use available signals like geolocation, time of day, device type, referral source, and real-time trends to make relevant recommendations even without user history.

4. Implement feedback loops and online learning

Describe how to capture user interactions (clicks, purchases, skips) to quickly update recommendations, using techniques like multi-armed bandits or online learning to adapt in real-time.

5. Monitor and iterate

Outline how to monitor performance of fallback strategies, conduct A/B tests, and refine the system based on metrics like engagement and conversion, ensuring continuous improvement.

Key Points to Mention

  • Cold-start problem and how to handle new or anonymous users
  • Fallback strategies: popularity, trending, contextual, segment-based
  • Use of implicit signals (clicks, views, time spent) to infer preferences
  • Real-time personalization and online learning (e.g., bandits)
  • Graceful degradation and system resilience
  • Metrics for success: CTR, conversion, retention, and how to measure them

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