← Waymo Interview Insights

Waymo·Machine Learning Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026

Summary

Waymo ML Engineer interview that came down to a classic string problem, but they pushed through all three solution tiers which made it feel more like a depth check than a coding warmup.

Questions Asked (1)

Q1

Given a string, find the longest palindromic substring. Walk through your approaches from brute force to optimal, and explain the trade-offs at each step.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Started with the O(N^3) brute force just to show I wasn't going to skip steps, then moved to expand-around-center which got me to O(N^2) with constant space.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem and constraints, then present a progression of solutions: brute force, dynamic programming, expand around center, and Manacher's algorithm. For each, explain time and space complexity and trade-offs, and finally discuss which approach is best for the given context (e.g., ML engineering at Waymo).

Pro tip: Relate the problem to real-world ML scenarios, such as processing sensor data or text sequences, and emphasize the importance of choosing the right algorithm based on constraints like input size and latency requirements.

1. Clarify requirements and constraints

Ask about input size, character set, and whether the palindrome needs to be contiguous. This helps determine the appropriate algorithm.

2. Present brute force approach

Explain checking all substrings and verifying palindrome, with O(n^3) time. Mention it's simple but inefficient for large inputs.

3. Introduce dynamic programming

Describe using a DP table to store palindrome status of substrings, reducing time to O(n^2) and space O(n^2). Discuss trade-off of space.

4. Explain expand around center

Detail expanding from each character and between characters, achieving O(n^2) time and O(1) space. Highlight it's often preferred for its simplicity and low space.

5. Discuss Manacher's algorithm

Mention linear time O(n) solution, but note its complexity and that it's rarely required unless performance is critical. Compare trade-offs with previous methods.

Key Points to Mention

  • Time and space complexity of each approach
  • Trade-offs between simplicity and efficiency
  • Edge cases: empty string, single character, all same characters
  • Handling even and odd length palindromes
  • Real-world applicability in ML (e.g., sequence processing)
  • Potential optimizations like early termination or using Manacher's for large inputs

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