Stripe logo

Stripe Hard Interview Questions

12 hard-level practice questions for Stripe technical interviews

coding Hard Verified Question #1

1. Filter Roles


Category: Tree coding problem
You are building a role-based access control (RBAC) system for a multi-tenant platform. The system manages user roles across a hierarchical account...
Input: List
Output: Array
coding Hard Verified Question #2

2. Rate Limiter


Category: Sliding window coding problem
Design a rate limiter that tracks API requests per client and enforces limits using a sliding time window. Your system must support: - hit(key,...
Input: Given input
Output:** Computed result
coding Hard Verified Question #3

3. Email Subscriptions


Category: String coding problem
Design a subscription management system that tracks user subscriptions and sends automated emails at specific lifecycle events. Email Types: -...
Input: List
Output: Computed result
coding Hard Verified Question #4

4. [Bug Squash] Mako Template Engine


Category: Tree coding problem
In this bug squash round, you will find and fix errors in a Python template library. You will receive a link to a GitHub folder containing a version...
Input: List
Output: Printed output
coding Hard Verified Question #5

5. [Bug Squash] Moshi JSON Library


Category: String coding problem
In this bug squash round, you will find and fix mistakes in a Java library called Moshi. You will receive a link to a GitHub folder containing a...
Input: String
Output: Computed result
coding Hard Verified Question #6

6. Data Center Load Scorer


Category: Graph coding problem
A data center operations team monitors server energy usage to optimize resource allocation. You receive a daily dataset of all incoming requests to...
Input: Graph (nodes and edges)
Output: Array
coding Hard Verified Question #7

7. Wallet Transaction Ledger


Category: String coding problem
A fintech platform processes streams of wallet transactions and needs to consolidate them into account summaries. Each transaction is logged as a...
Input: List
Output: Computed result
coding Hard Verified Question #8

8. Employee Record Matcher


Category: Array coding problem
A data-quality team needs to detect duplicate or near-duplicate employee records in a large HR dataset. Each record is a row in a 2D string array...
Input: Array
Output: Array
coding Hard Verified Question #9

9. Candidate Tech Stack Filter


Category: String coding problem
A hiring platform screens candidates by comparing their declared technology stack against a job's required skills. A candidate submits a...
Input: Array of strings
Output: Array
coding Hard Verified Question #10

10. Subscriber Notification Planner


Category: Trie-based coding problem
A subscription service sends automated notifications to subscribers based on their subscription window. You are given a list of subscriber records...
Input: List
Output: Array
coding Hard tree #1

1. [OA] Tree — Implement Stripe's payment transaction history

To improve user experience, Stripe needs a data structure to represent users' transaction histories in a way that allows for efficient retrieval and management.
Problem statement: Design a transaction history structure where each transaction has an int transactionId, double amount, string date, and nested transactions. Implement methods to add a transaction and to retrieve the transaction with the highest amount.
- addTransaction(transactionId: int, amount: double, date: string): void: Add a transaction to the history.
- getMaxTransaction(): (int, double, string): Returns the ID, amount, and date of the transaction with the highest amount.
Example 1:
Input: addTransaction(1, 100.50, '2023-03-01')
Output: None
Example 2:
Input: addTransaction(2, 200.75, '2023-03-02')
Output: None
Input: getMaxTransaction()
Output: (2, 200.75, '2023-03-02')
Constraints:
- 1 <= transactionId <= 10^6
- 0 <= amount <= 10^6
- date follows the format 'YYYY-MM-DD'.
coding Hard sliding window #2

2. [OA] Sliding Window — Implement a rate-limiting service for Stripe API

In order to protect our APIs from abuse and to ensure fair usage, Stripe requires a sliding window rate limiter that tracks the number of requests for each API key over a given time period.
Problem statement: You need to implement a rate limiter that allows a specified number of requests per minute (e.g., 100 requests) for each unique string apiKey. Ensure that the rate limiter has a method to track requests and should return a boolean indicating whether the request is allowed.
- trackRequest(apiKey: string): boolean: Returns true if the request is allowed, false otherwise.
Example 1:
Input: trackRequest('key1')
Output: true
Explanation: The request is allowed.
Example 2:
Input: trackRequest('key1') (100 times)
Output: true (first 100 calls)
Output: false (101st call)
Constraints:
- 1 <= apiKey.length <= 100
- Rate limit can be bursty but should not exceed specified limits.
- Simulate up to 10^6 requests.

Start practicing Stripe questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free