← Stripe Interview Insights

Stripe·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Stripe coding round focused entirely on a multi-part email handling problem that kept building on itself. Each part had to be fully tested before moving forward, which was a different pace than I'm used to.

Questions Asked (3)

Q1

Parse and normalize email addresses using Gmail-style canonicalization: strip dots from the local part and ignore anything after a plus sign, then return the cleaned address.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Felt fine at first since I'd seen a version of this before.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the exact normalization rules and edge cases (e.g., multiple plus signs, dots in domain) before coding. Then implement a clean solution by splitting the email at '@', processing the local part (remove dots, truncate at first '+'), and reassembling. Discuss trade-offs like in-place vs. new string, and test with examples.

Pro tip: Mention that Gmail's canonicalization is specific to Gmail and not a general email standard; for a company like Stripe, you'd likely need to handle multiple providers or store the original email for delivery. This shows awareness of real-world constraints.

1. Clarify requirements and edge cases

Ask about the definition of 'Gmail-style': does it apply only to gmail.com addresses? How to handle multiple plus signs, dots in domain, or invalid emails? Confirm expected output format.

2. Outline the algorithm

Explain the steps: split at '@', process local part by removing all '.' and truncating at the first '+', then concatenate with the domain. Mention that domain is left unchanged.

3. Implement and test

Write clean code (e.g., in Python) using string methods. Walk through examples like 'first.last+tag@gmail.com' -> 'firstlast@gmail.com' and edge cases like 'a+b+c@d.com' -> 'a@d.com'.

4. Discuss trade-offs and extensions

Talk about time/space complexity (O(n) time, O(n) space). Consider if normalization should be provider-specific, and how to handle non-Gmail addresses. Mention potential need to store original email for sending.

Key Points to Mention

  • Splitting the email into local part and domain at the last '@' to handle cases where '@' might appear in local part (though rare).
  • Removing all dots from the local part, not just consecutive ones.
  • Truncating the local part at the first '+' sign, ignoring everything after.
  • Leaving the domain part unchanged, including any dots or plus signs.
  • Handling edge cases: empty local part after normalization, multiple plus signs, dots in domain, and invalid emails.
  • Time and space complexity: O(n) time and O(n) space for creating a new string.
  • Real-world consideration: Gmail-specific normalization may not apply to other providers; storing original email for delivery.

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

Q2

Given a list of emails (some of which are duplicates after normalization), group them and count how many unique recipients there are.

Algorithms & Data Structures
Author's notes

Straightforward extension of part one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the normalization rules (e.g., lowercase, remove dots in local part, strip plus aliases) and confirm whether grouping is by normalized email or by domain. Then use a hash set to track unique normalized emails, or a hash map to group original emails by normalized form, and count the unique keys.

Pro tip: Mention that normalization rules can be provider-specific (e.g., Gmail ignores dots and plus aliases, but other providers may not), so it's crucial to ask the interviewer for the exact rules to avoid over- or under-normalizing.

1. Clarify requirements

Ask about the normalization rules: case sensitivity, dot removal, plus alias handling, and whether subaddressing is universal. Confirm if grouping should be by normalized email or by domain.

2. Choose data structures

Decide between a hash set (for counting unique) or a hash map (for grouping). Consider time and space complexity; both are O(n) time and O(n) space.

3. Implement normalization

Write a function to normalize an email according to the clarified rules. Handle edge cases like invalid emails or missing parts.

4. Process and group

Iterate through the list, normalize each email, and either add to the set or append to the map's list for that normalized key.

5. Return result and discuss

Return the count of unique normalized emails or the grouped map. Discuss potential optimizations, such as early termination or parallel processing for large lists.

Key Points to Mention

  • Normalization rules: lowercase, remove dots in local part, strip plus aliases (e.g., user+tag@domain.com -> user@domain.com).
  • Data structures: hash set for unique count, hash map for grouping original emails by normalized form.
  • Time and space complexity: O(n) time, O(n) space, where n is the number of emails.
  • Edge cases: invalid emails, empty strings, emails with multiple plus signs, and provider-specific rules.
  • Scalability: for very large lists, consider streaming or distributed processing (e.g., MapReduce).
  • Testing: verify with examples like 'a.b@domain.com' and 'ab@domain.com' if dots are ignored, and 'user+tag@domain.com' and 'user@domain.com'.

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

Q3

Extend the email system with filtering, blocking, or routing rules so that certain addresses or patterns get handled differently.

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

This is where things got interesting and a bit stressful.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: what types of rules (filtering, blocking, routing), who manages them, and how they interact with existing email flow. Then propose a rule engine that evaluates incoming emails against user-defined rules, with actions like deliver, block, or route. Discuss trade-offs in storage, evaluation order, and scalability, and consider how to handle edge cases like rule conflicts and performance.

Pro tip: Emphasize idempotency and auditability: rules should be applied exactly once per email, and every action should be logged for debugging and compliance. This shows you think about production reliability, not just functionality.

1. Clarify Requirements

Ask about rule types (e.g., exact match, regex, domain), actions (deliver, block, forward, label), and who can create rules (users, admins). Also clarify scale: number of users, emails per second, and rule complexity.

2. Design Data Model

Propose a schema for rules: each rule has conditions (field, operator, value) and actions (type, parameters), plus priority and enabled status. Consider storing rules in a database with indexing for fast lookup.

3. Rule Evaluation Engine

Design an engine that evaluates rules in priority order, short-circuits on first match, and applies actions. Discuss caching compiled rules for performance and handling conflicts (e.g., first-match vs. all-match).

4. Integration with Email Pipeline

Explain where the rule engine fits: after receiving email but before delivery. Ensure it doesn't block the main email flow; consider async processing or a separate service.

5. Trade-offs and Scalability

Discuss trade-offs: regex performance vs. exact match, rule evaluation latency, storage costs, and consistency. Propose sharding by user or using a distributed cache for rules.

Key Points to Mention

  • Rule priority and conflict resolution (e.g., first-match wins, or explicit priority field)
  • Performance considerations: indexing, caching, and avoiding regex on every email
  • Idempotency and exactly-once processing to prevent duplicate actions
  • Auditability: logging rule matches and actions for debugging and compliance
  • Extensibility: supporting new condition types and actions without major refactoring
  • User experience: how users create and manage rules (UI/API) and preview effects

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