
Stripe Interview Questions
11 real coding interview questions recently asked at Stripe, spanning Coding and Integration, with a real difficulty tag and a direct LeetCode link for every question.
By DevsUnite · 11 Problems
Total Problems: 11Difficulty Levels:EasyMediumHard
Given an array and a target, find the two indices whose values sum to the target, typically solved in a single pass using a hash map that stores each value's complement as it's seen. It requires no advanced technique, which is exactly the point — it's a fast, low-friction warm-up used to confirm a candidate can reach for a hash map instead of defaulting to a brute-force O(n^2) nested loop.
A design problem requiring O(1) get and put operations with least-recently-used eviction, implemented by combining a hash map (for O(1) lookup) with a doubly linked list (for O(1) reordering and eviction from either end). This exact structure underlies real inference key-value caches — it's reportedly one of the most frequently asked design questions at companies building LLM inference systems, since eviction policy for a bounded cache maps directly onto managing GPU memory for attention KV caches. It's a strong test of whether a candidate can compose two data structures to get O(1) across every required operation, not just some of them.
Given a collection of intervals, merge all overlapping ones. The standard approach sorts intervals by start time, then does a single linear pass, extending the current merged interval whenever the next one overlaps and starting a new one otherwise. It's a foundational interval problem that shows up across many companies because interval merging underlies a large family of harder scheduling and calendar-style questions.
This design problem asks for a counter that records hits with timestamps and can report the number of hits in the past 300 seconds. It's typically implemented with a queue (or a fixed-size circular buffer of timestamp/count pairs) that evicts entries falling outside the trailing time window as new hits arrive. It tests whether a candidate can design a data structure for a sliding time window under both single-hit and (in a common follow-up) batched-hit conditions.
Requires counting element frequencies with a hash map, then selecting the k most frequent using either a heap (O(n log k)) or bucket sort by frequency (O(n)). It's a common building block for ML preprocessing workflows — identifying the most frequent tokens, features, or events in a dataset before further processing — which is part of why it recurs in ML-adjacent interview loops. The bucket-sort approach in particular tests whether a candidate recognizes that frequency is bounded by array length and can exploit that to avoid a full sort.
Count the number of contiguous subarrays that sum to exactly k. The efficient solution uses a running prefix sum alongside a hash map counting how many times each prefix-sum value has occurred, since a subarray sums to k exactly when the difference between two prefix sums equals k. It's a strong test of the prefix-sum-plus-hash-map pattern, a technique that generalizes to many other subarray-counting problems.
A design problem requiring a hash map from key to a list of (timestamp, value) pairs, plus binary search to efficiently find the value at or before a queried timestamp. It tests whether a candidate can combine a hash map with binary search rather than resorting to a linear scan, since values are appended with strictly increasing timestamps. It's a natural fit for companies dealing with versioned or time-stamped storage — Anthropic and OpenAI probe it in the context of retrieving the right version of a model checkpoint by timestamp, a real pattern in ML infrastructure.
Given prerequisite pairs, this problem asks whether all courses can be finished, which is equivalent to detecting a cycle in a directed graph. Candidates typically solve it with Kahn's algorithm (in-degree tracking and a queue) for topological sort, or with DFS using a three-color (unvisited/visiting/visited) scheme to catch back edges. It tests fundamental graph modeling skills — representing prerequisites as an adjacency list and correctly distinguishing cycle detection from simple reachability.
A canonical unbounded-knapsack dynamic programming problem: given coin denominations and a target amount, find the minimum number of coins needed to make that amount (or determine it's impossible). The standard solution builds a bottom-up DP array where each amount's answer depends on smaller amounts reduced by each coin denomination. It's often used to gauge whether a candidate can correctly set up and reason about a 1D DP recurrence and its base cases, a foundational skill for many other DP problems.
A design problem: encode a binary tree into a string and reconstruct an identical tree from that string, typically via a preorder traversal with explicit null markers, or a BFS-based level encoding. The candidate must design a format that's unambiguous enough for deserialization to rebuild structure without extra information. Interview relevance frequently maps to data persistence — serializing structured data for storage or transmission and reliably reconstructing it — which is why it shows up across companies handling tree-like or hierarchical data on disk or over the wire.
This problem asks for the maximum value in every fixed-size window as it slides across an array, and the naive per-window scan is O(nk), so the real test is whether you can get to O(n) using a monotonic deque that stores candidate indices in decreasing order of value. You need to correctly pop from the back whenever a new element invalidates smaller values still in the deque, and pop from the front whenever the window's leftmost index expires. It's a strong signal for whether a candidate can reason about amortized complexity and maintain a non-obvious data-structure invariant under a moving constraint, rather than just knowing the deque trick by rote.
Log in to save your progress, favorites, and notes to your account.
Frequently asked questions
What coding interview questions does Stripe ask?
This page tracks 11 real, recently reported Stripe coding interview questions, organized by topic: Coding and Integration.
How many Stripe interview questions are on this list?
11 questions in total: 1 Easy, 8 Medium, and 2 Hard, each linked to its real LeetCode problem page.
Is it free to use?
Yes. Browsing every problem on this page is completely free, with no account required. Creating a free DevsUnite account lets you save your checked-off progress, star favorites, and add personal notes that sync across devices.
Do I need an account to track my progress?
You can read and solve every problem without logging in. An account is only required to mark a problem as done, star it, or add a note. Those actions save to your account instead of resetting on refresh.