← Zoox Interview Insights

Zoox·Machine Learning Engineer·Technical Phone Screen·Senior

Senior
Jul 2026

Summary

Zoox ML engineer interview with a coding problem that looked like a simple scoring exercise but had a design follow-up that actually made me think. The OOP angle was the real test, not the math.

Questions Asked (2)

Q1

Given a list of roller coaster descriptions with type, max speed, bumps per second, and lift type, compute an overall score for each coaster using type-specific rules for scale factor and comfort score. Return the scores rounded to one decimal place.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The formula itself wasn't bad once I mapped out the three types separately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the type-specific rules for scale factor and comfort score, including how they combine into an overall score. Then, outline a modular implementation that processes each coaster, applies the appropriate rules, and rounds the result to one decimal place. Finally, discuss trade-offs such as extensibility and performance.

Pro tip: Emphasize writing clean, extensible code by using a strategy pattern or a dictionary of functions for each coaster type, which makes adding new types easy without modifying existing logic. Also, mention that you would validate inputs and handle edge cases like missing fields or unknown types gracefully.

1. Clarify requirements and rules

Ask questions to confirm the exact formulas for scale factor and comfort score per type, and how they combine (e.g., product, sum, weighted average). Ensure you understand the rounding requirement.

2. Design a modular solution

Plan a function that takes a coaster description and returns a score. Use a dispatch mechanism (e.g., if-elif, dictionary mapping) to select type-specific logic for scale factor and comfort score.

3. Implement and compute scores

For each coaster, extract type, max speed, bumps per second, and lift type. Apply the type-specific rules to compute scale factor and comfort score, then combine them into an overall score.

4. Round and return results

Round each overall score to one decimal place using appropriate rounding (e.g., round half up). Return the list of scores in the same order as input.

5. Test and discuss trade-offs

Walk through test cases including edge cases (e.g., zero bumps, unknown type). Discuss trade-offs like code maintainability, performance for large lists, and potential for parallelization.

Key Points to Mention

  • Type-specific rules: how scale factor and comfort score are defined for each coaster type (e.g., wooden vs steel).
  • Combination formula: whether overall score is a product, sum, or weighted combination of scale factor and comfort score.
  • Rounding: using round half up or Python's round function, and ensuring one decimal place (e.g., formatting with f-strings).
  • Modularity: using a strategy pattern or dictionary of functions to encapsulate type-specific logic for extensibility.
  • Edge cases: handling missing data, unknown coaster types, zero or negative values, and ensuring robustness.
  • Performance: considering time complexity (O(n) for n coasters) and potential optimizations like vectorization if using libraries like NumPy.

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

Q2

Redesign your solution so that adding new coaster types or changing scoring rules doesn't require touching the core processing logic. How would you apply the open/closed principle here?

System DesignTechnical Trade-offs
Author's notes

This is where the interview actually got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by identifying the varying parts of the system (coaster types, scoring rules) and encapsulating them behind stable interfaces. Then show how the core processing logic depends only on abstractions, so new types or rules can be added via new classes or configuration without modifying existing code. Finally, discuss how this applies to ML systems, such as pluggable models or reward functions.

Pro tip: Emphasize that the open/closed principle is about managing dependencies, not eliminating them; use dependency inversion and clear extension points to keep the core stable while allowing flexibility.

1. Identify variation points

Determine what aspects of the system are likely to change, such as coaster types or scoring rules, and separate them from the stable core logic.

2. Define abstractions

Create interfaces or abstract classes that represent the varying behaviors, e.g., a CoasterType interface or a ScoringRule interface.

3. Invert dependencies

Make the core processing logic depend on these abstractions rather than concrete implementations, using dependency injection or a factory/registry pattern.

4. Implement extensions

Add new coaster types or scoring rules by creating new classes that implement the interfaces, without modifying the core logic.

5. Validate with examples

Provide a concrete example, such as adding a new coaster type or changing scoring, and explain how the core remains untouched.

Key Points to Mention

  • Open/Closed Principle: open for extension, closed for modification
  • Strategy pattern for interchangeable algorithms (e.g., scoring rules)
  • Factory or registry pattern for dynamic creation of coaster types
  • Dependency inversion: depend on abstractions, not concretions
  • Configuration-driven behavior to avoid code changes
  • Analogies to ML: pluggable models, loss functions, or reward functions

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