Stripe Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Process auth requests with fraud rules
Question Implement a function that, given a list of Authorization Requests (timestamp_seconds, unique_id, amount, card_number, merchant), outputs a hu...
Convert bitmap into ASCII characters
Question Given an array/string of 0-1 bits representing a bitmap font, write code to render each character as a grid using '.' for 0 and '#' for 1, an...
Implement account scheduler with locking and LRU
Design a class AccountScheduler that manages the time-based availability of a fixed set of account IDs. Initialization You are given: - accounts: a li...
Find linked user records by similarity
You are given a list of user records. Each record has the following fields: - id (integer, unique) - name (string) - email (string) - company (string)...
Implement streaming per-user reservoir sampling
Design and code (in Python) a streaming algorithm that ingests an unbounded event stream of tuples (user_id, event_time, event_type) and maintains, fo...
Compute currency conversions with graph algorithms
Given a set of currency exchange relations such as 'A:B = 1:1.5' and 'B:C = 1:1.5' (meaning 1 A = 1.5 B and 1 B = 1.5 C), design algorithms and data s...
Implement Luhn-based card validation and inference
Implement utilities for credit-card validation and inference using the Luhn algorithm. Card brands and formats: VISA — 16 digits, starts with 4; MASTE...
Implement multi-part cost calculator
You are given a price catalog and a list of orders. Implement the following in any language (Python examples acceptable): Inputs - price_catalog: mapp...
Implement multi-network card validator with Luhn
Design and implement a payment card validation module that supports multiple networks and error scenarios. Requirements: 1) Luhn checksum - Implement ...
Compute currency conversions with graphs and topological sort
You are given pairwise currency ratios such as "a:b = 1:1.5" and "b:c = 1:1.5". Design functions to: ( 1) store direct conversions; ( 2) answer querie...
Validate and infer credit cards with Luhn
Implement a credit-card validation suite using the Luhn algorithm and brand patterns. Brand patterns: - VISA: 16 digits, starts with 4 - MASTERCARD: 1...
Plan bicycle routes on a city map
You are given a city bicycle network as a weighted graph where edges encode distance, bike-lane availability, elevation gain, and traffic risk. Comput...
Design a subscription email scheduler with changes and renewals
Implement an email notification scheduler for subscription accounts. Inputs: - send_schedule: a mapping whose keys include: • "start": label to send...
Validate Credit Card Numbers and Corrections
Question Q1. Given a credit-card number string, return whether it passes the Luhn checksum and, if valid, identify its brand among VISA (16 digits sta...
Implement Card Validation and Recovery System
Question Design and implement a payment-card validation system supporting: Basic VISA validation (16-digit numbers starting with 4) using the Luhn che...
Implement tiered shipping calculator
Implement in JavaScript a shipping-cost calculator with three progressively richer pricing models based on a configuration object keyed by destination...