Card Range Obfuscation Part 1
Reported by candidates from Stripe's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Stripe hit you with Card Range Obfuscation Part 1 in November. You're being asked to mask or transform credit card ranges in some way, probably to hide sensitive data while keeping enough info for lookups. This is a real Stripe concern: payment systems have to handle card data without exposing it. If you blank on the exact algorithm, StealthCoder will read the problem and hand you the pattern live. For now, think about what "obfuscation" means in a payment context and how you'd hide a range of numbers.
Pattern and pitfall
The problem likely wants you to take card number ranges and apply a consistent masking or hashing scheme that preserves range structure. The trick is usually that you can't just hash each card independently; you need a function that respects ordering or grouping. Common approaches: use a prefix hash, apply a substitution cipher to ranges, or build a lookup that maps original ranges to obfuscated ones. The pitfall is overthinking security. Stripe doesn't care about cryptographic strength here; they want a reversible or semi-reversible transformation that lets systems talk about card ranges without exposing them. StealthCoder will parse the exact input/output format and show you the pattern immediately.
StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.
You can drill Card Range Obfuscation Part 1 cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. If you're reading this with an OA window open, you're who this was built for.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Stripe's OA.
Stripe reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Card Range Obfuscation Part 1 FAQ
Is this a hashing problem or a string manipulation problem?+
It's a transformation problem. You're likely taking card ranges (like 400000-499999) and converting them to a different representation. Don't assume full crypto hashing; Stripe usually wants something simpler and reversible or at least consistent.
Do I need to preserve range ordering?+
Probably. If card A comes before card B, the obfuscated versions should too. That rules out naive hashing and points toward prefix-based or index-based schemes. Read the examples carefully.
Is Part 1 just the setup or is it the full problem?+
Part 1 is usually the foundational piece. Expect a Part 2 that adds constraints. For now, focus on the basic obfuscation logic. Don't overthink edge cases until you see examples.
What's the most common pitfall candidates hit?+
Treating each card number independently instead of thinking in ranges. Card systems work with BIN ranges and IIN blocks. Your solution should handle ranges as atomic units, not iterate every number in a 100k-card span.
How do I prep in 48 hours if I've never seen this?+
Understand BIN (Bank Identification Number) ranges and IIN (Issuer Identification Number) structures. Look at how payment processors mask cards. Then focus on the problem examples. You don't need payment domain expertise; the problem will tell you what to do.