Stripe Phone Screen | Senior Software Engineer Interview
- Result
- Ongoing
- Posted
- 9 Oct 2025
Summary
I had a phone screen interview with Stripe for a Senior Software Engineer role. The interview focused on a two-part problem involving shipping cost calculation, which I managed to solve within the given time. I'm uncertain about the outcome, but I'll wait and see.
How it went
I recently had a phone screen interview for a Senior Software Engineer position at Stripe. The interview presented a coding challenge in two parts, both revolving around calculating shipping costs based on varying parameters. I successfully solved the first part, which involved a basic calculation using fixed product costs per country, in about 20 minutes. The second part introduced more complexity, requiring me to handle quantity-based discounts where costs were defined in slabs. I managed to tackle this part as well before we ran out of time. The interviewer mentioned I needed to solve as many parts as possible within 45 minutes, which I did. However, I have a feeling I might not receive a callback, but I'm keeping my options open.
Questions asked (2)
- 01
Calculate Shipping Cost - Basic
Data Structures & Algorithms · Medium
You are given two JavaScript objects:
orderandshipping. You need to calculate the total shipping cost for the given country in theorderobject.order = { "country": "US", "items": [ {"product": "mouse", "quantity": 5}, {"product": "laptop", "quantity": 2} ] }shipping = { "US": [ {"product": "mouse", "cost": 500}, {"product": "laptop", "cost": 1000} ], "CA": [ {"product": "mouse", "cost": 700}, {"product": "laptop", "cost": 1200} ] }In this example, the total shipping cost would be
5 * 500 + 2 * 1000 = 4500. - 02
Calculate Shipping Cost with Quantity Discounts
Data Structures & Algorithms · Medium
Extend the previous problem. Now, if discounts are given for different quantities, how would you calculate the shipping cost? The
shippingobject has been modified to include quantity-based cost slabs.shipping = { "CA": [ {"product": "mouse", "cost": 500}, {"product": "laptop", "cost": 1000} ], "US": [ {"product": "mouse", "cost": [{ minQuantity:0, maxQuantity:2, cost: 200 }, { minQuantity:3, maxQuantity:null, cost: 700 } ] }, {"product": "laptop", "cost": [{ minQuantity:0, maxQuantity:null, cost: 700 } ] } ] }Using the original
order(5 mice, 2 laptops in US), the shipping cost would be(3 * 200 + 2 * 700) + (2 * 700) = 600 + 1400 + 1400 = 3400. (Note: The provided example calculation3 * 200 + 2 * 700 + 2 * 700implicitly assumes 5 mice, where 3 fall into theminQuantity:3slab and 2 into theminQuantity:0, maxQuantity:2slab, which is a bit ambiguous; a more direct interpretation would be finding the *single* applicable slab for the *total* quantity of 5 mice, which isminQuantity:3, cost: 700, making it5 * 700. However, following the example calculation3 * 200 + 2 * 700 + 2 * 700, it implies a weighted average or a specific interpretation of how to apply multiple slabs for a single quantity. For clarity, I will assume finding the *single best matching slab* for the total quantity based onminQuantitybeing less than or equal to item quantity andmaxQuantitybeing greater than or equal to item quantity, ornull.)