InterviewDB
Question
Credit Card Number: Validate and Mask Credit Card Numbers Using Luhn's Algorithm
phone
Question Details
Problem Implement two functions: is_valid(card_number: str) -> bool — validate using the Luhn algorithm. mask(card_number: str) -> str — replace all but the last 4 digits with *. The Luhn check: from the rightmost digit, double every second digit; if…
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Coding
Phone
More from Stripe
Reddit
Anyone giving interviews for backend IC 2 at stripe?
Reddit
Anyone interviewed at Stripe for Frontend role?
Reddit
Stripe SWE onsite interviews:Need guidance
Reddit
Stripe New Grad 2026 SWE — does everyone get a Hiring Manager round after VO?
Reddit
Stripe Integration and Bug Bash rounds interview experience