Stripe's programming round is different from other companies. Instead of 2-3 unrelated LeetCode problems, they give you a single problem that evolves across 3 parts over 60 minutes. Sharing my experience.
The format:
My problem: Shipping Cost Calculator
Part 1: Given a list of packages with weights, and ships with a weight limit and fixed cost — find the minimum cost to ship all packages. Greedy works here (pack heaviest first). Solved relatively quickly.
Part 2: Each ship now has both a weight limit and a volume limit. Greedy starts breaking for edge cases. I walked through why greedy fails with a counterexample before changing approach.
Part 3: Multiple ship types with different cost structures, both weight and volume constraints. This is where DP comes in. State: dp[i][w][v] = minimum cost to ship the first i packages. I had a working solution but not the most optimized — the interviewer prompted me toward state compression.
What Stripe actually evaluates: