Category: Tree coding problemYou 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
codingHardVerified Question#2
2. Rate Limiter
Category: Sliding window coding problemDesign 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
codingMediumVerified Question#3
3. Shipping Cost Calculator
Category: Algorithm coding problemYou are building a shipping cost calculator for an international e-commerce platform. The cost depends on the destination country and the product...Input: Integer(s) Output: Computed result
codingMediumVerified Question#4
4. Transaction Fee Calculator
Category: Trie-based coding problemYou are building a fee calculation system for a payment processing platform. Given transaction data as a CSV string, calculate fees based on payment...Input: String Output: Computed result
codingMediumVerified Question#5
5. Bitmap to Image Conversion
Category: Grid/matrix coding problemYou are designing a bitmap character rendering system. Given a lookup table mapping characters to 2D binary arrays, implement functionality to print,...Input: 2D grid Output: Printed output
codingMediumVerified Question#6
6. [Onsite Integration] Bike Map
Category: Trie-based coding problemYou are building a map visualization tool that generates static maps from location data. Implement a system that reads GPS coordinates, constructs...Input: Array Output: Computed result
codingHardVerified Question#7
7. Email Subscriptions
Category: String coding problemDesign a subscription management system that tracks user subscriptions and sends automated emails at specific lifecycle events. Email Types: -...Input: List Output: Computed result
codingHardVerified Question#8
8. [Bug Squash] Mako Template Engine
Category: Tree coding problemIn 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
codingHardVerified Question#9
9. [Bug Squash] Moshi JSON Library
Category: String coding problemIn 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
codingHardVerified Question#10
10. Data Center Load Scorer
Category: Graph coding problemA 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
codingMediumVerified Question#11
11. Content Validation Pipeline
Category: String coding problemA platform ingests user-generated content records in a simplified CSV format. Before indexing or displaying any content, each record must pass a...Input: Array of strings Output: Array
codingHardVerified Question#12
12. Wallet Transaction Ledger
Category: String coding problemA 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
codingHardVerified Question#13
13. Employee Record Matcher
Category: Array coding problemA 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
codingHardVerified Question#14
14. Candidate Tech Stack Filter
Category: String coding problemA 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
codingHardVerified Question#15
15. Subscriber Notification Planner
Category: Trie-based coding problemA subscription service sends automated notifications to subscribers based on their subscription window. You are given a list of subscriber records...Input: List Output: Array
codingMediumVerified Question#16
16. Support Ticket Dispatcher
Category: Graph coding problemA customer support platform assigns incoming tickets to agents to keep workloads balanced. You are given a list of agent names and a list of tickets...Input: Graph (nodes and edges) Output: Array
codingMediumVerified Question#17
17. Order Payment Reconciler
Category: String coding problemA billing system needs to match incoming payments to open orders. Each payment arrives as a comma-separated string with three fields: a payment ID, a...Input: List Output: Computed result
codingMediumVerified Question#18
18. Service Usage Cost Calculator
Category: Array coding problemA cloud billing module computes the total cost for a customer's monthly usage. You are given a usage_report specifying the target region and...Input: Array Output: Computed result
codingMediumgraph#1
1. Graph — Find the shortest transaction path
Background: In Stripe's payment processing system, understanding transaction flows is crucial for identifying bottlenecks and optimizing performance. This problem is related to ensuring that transaction paths are efficient.Problem statement: You are given a directed graph where each node represents a transaction, and an edge from A to B indicates that transaction A directly leads to transaction B. Write a function that finds the shortest path from a given start transaction to an end transaction. Return the path as a list of transactions. If there is no path, return an empty list.Function/class signature:
Each transaction is represented as a unique string.
codingMediumhash map#2
2. [Hash_map] — Find unprocessed payments from a list
Background: Stripe processes millions of transactions daily. Occasionally, payments may not be fully completed due to various issues (e.g., network failures, user cancellations). Identifying unprocessed payments quickly can help improve user experience and operational efficiency. Problem statement: You are given a list of payment IDs. Some payments are successfully processed, while others remain unprocessed, indicated by their accompanying status (either processed or unprocessed). Create a function that returns all payment IDs that are unprocessed. Function/class signature:
Example 1: Input: payment_list = [('abc123', 'processed'), ('xyz789', 'unprocessed'), ('qwe456', 'processed')] Output: ['xyz789'] Explanation: Only the payment with ID xyz789 is unprocessed.Example 2: Input: payment_list = [('p1', 'unprocessed'), ('p2', 'unprocessed'), ('p3', 'processed')] Output: ['p1', 'p2'] Explanation: Both payments p1 and p2 are classified as unprocessed.Constraints:
The length of payment_list can be between 1 and 10^5.
Each payment ID is a string of up to 100 characters.
Each status is guaranteed to be either processed or unprocessed.
codingHardtree#3
3. [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.
4. [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.