← Stripe Interview Insights

Stripe·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Stripe SWE screen, one coding problem the whole time. The problem looked like a boring CSV parsing exercise but there was enough edge-case logic in the scoring rules that it took me longer than I expected to get clean.

Questions Asked (1)

Q1

You're given three lists of CSV strings: transactions, scoring rules, and merchants. Each merchant has a base score. For every rule, scan that merchant's transactions and add different point values depending on whether each transaction amount is below, equal to, or above the rule's threshold. Sum all rule contributions across all transactions and return the final score per merchant in the original order.

Algorithms & Data StructuresAPI & Integrations
Author's notes

Spent the first few minutes just parsing the CSV strings and almost forgot to handle the base score, which would've been embarrassing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the input format and edge cases, then outline a solution that parses the CSV strings, builds a map from merchant to transactions, and for each merchant iterates over all rules and transactions to compute the score. Emphasize efficiency by pre-grouping transactions per merchant and using a single pass per rule-transaction pair, and discuss potential optimizations like sorting or early exits.

Pro tip: Mention that you would confirm the expected time complexity and whether the lists can be large, then propose an O(M * R * T) solution but note that if rules are static, you could precompute thresholds or use binary search for faster lookups. Also, highlight the importance of handling ties and floating-point precision if amounts are not integers.

1. Clarify requirements and edge cases

Ask about input size, data types (e.g., are amounts integers or floats?), whether merchants can have no transactions, and if rules can have duplicate thresholds. Confirm the output format and order.

2. Parse and organize data

Parse the CSV strings into structured objects (e.g., merchant ID, transaction amounts, rule thresholds and point values). Group transactions by merchant to avoid repeated scanning.

3. Design the scoring algorithm

For each merchant, initialize score with base score. For each rule, iterate through the merchant's transactions and add points based on comparison (below, equal, above). Sum contributions.

4. Analyze complexity and optimize

Discuss time complexity O(M * R * T) and space O(T). Suggest optimizations like sorting transactions per merchant and using binary search for each rule threshold to reduce to O(M * R log T).

5. Test and validate

Walk through a small example, test edge cases (empty lists, no transactions, equal amounts), and verify output order matches input merchant order.

Key Points to Mention

  • Data parsing and handling CSV strings robustly (e.g., splitting, trimming, type conversion).
  • Grouping transactions by merchant to avoid redundant scans and improve efficiency.
  • Comparison logic: strictly below, equal, strictly above, and handling floating-point precision if needed.
  • Time and space complexity analysis, with potential optimizations like sorting and binary search.
  • Edge cases: empty transactions, merchants with no transactions, rules with same threshold, negative amounts.
  • Maintaining original merchant order in the output.

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