Reported September 2026
Capital Onemath

Digit-Coded Card Validation

Reported by candidates from Capital One's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Capital One OA. Under 2s to a working solution.
Founder's read

The Capital One OA reported in September 2026 looks like a simple parsing task, but one strict comparison sinks a lot of first attempts. It's Digit-Coded Card Validation. You get three parallel arrays and have to return a boolean per payment. There's no real algorithm here. It's pure rule translation, tagged as math, and the whole game is reading indices correctly and not fumbling the boundary at amount 100. If you blank under the clock, StealthCoder is the invisible backup that reads the spec on screen and hands you the logic. Know the trap before you start.

The problem

You are given three parallel arrays describing digit-coded payments: cardNumbers, transactionIds, and integer-dollar amounts. Return one validity flag per payment in input order.
Indices are zero-based from the left. In each 16-digit card number, index 13 is 1 for multi-use and 0 for one-time, index 14 is 0 for Visa and 1 for Master, and index 15 is 1 for merchant-bound and 0 for unbound. In each 8-digit transaction ID, index 6 is 1 for charge and 0 for authorization, while index 7 is 1 for online and 0 for offline.
A Visa payment is valid when the card is merchant-bound and multi-use, or when the transaction is an online charge below 100. A Master payment is valid when an unbound card has amount below 100, or when a merchant-bound card has amount above 100. These comparisons are strict, so amount 100 satisfies neither amount rule.

Function
validatePayments(cardNumbers: String[], transactionIds: String[], amounts: int[]) → boolean[]

Examples
Example 1
cardNumbers = ["1234567891011111"]
transactionIds = ["50781100"]
amounts = [150]
return = [true]
The card's final three flags are 111: multi-use, Master, and merchant-bound. A merchant-bound Master payment above 100 is valid.
Example 2
cardNumbers = ["1234567890123101","1234567890123000","1234567890123010","1234567890123011"]
transactionIds = ["12345600","12345611","12345600","12345611"]
amounts = [500,99,99,100]
return = [true,true,true,false]
The first Visa card is merchant-bound and multi-use. The second is an online Visa charge below 100. The third is an unbound Master payment below 100. The last is merchant-bound Master at exactly 100, which matches neither strict amount rule.
Example 3
cardNumbers = ["1234567890123000"]
transactionIds = ["12345601"]
amounts = [50]
return = [false]
This is an online Visa authorization, not a charge, and the card is neither merchant-bound nor multi-use.

Constraints
1 <= cardNumbers.length = transactionIds.length = amounts.length <= 100000.
Every card number contains exactly 16 decimal digits, and every transaction ID contains exactly 8 decimal digits.
Each encoded flag at card indices 13, 14, and 15 and transaction indices 6 and 7 is either 0 or 1.
1 <= amounts[i] <= 1000000000.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick is to extract five flags per payment and evaluate two boolean expressions. From the card: multi-use at index 13, Master at index 14, merchant-bound at index 15. From the transaction ID: charge at index 6, online at index 7. Visa is valid if merchant-bound and multi-use, or if online charge and amount < 100. Master is valid if unbound and amount < 100, or merchant-bound and amount > 100. The pitfall is the strict comparisons. Amount 100 fails both Master rules, and Example 2 tests exactly that. The other pitfall is off-by-one indexing, since the string is zero-based from the left. Compare characters to '1' and don't parse the whole string as a number, because 16 digits and leading zeros cause trouble. It's O(n) with constant work per payment. If you freeze on the rule mapping, StealthCoder can sit as a quiet hedge during the live OA.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Digit-Coded Card Validation 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. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Capital One's OA.

Capital One reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Digit-Coded Card Validation FAQ

How hard is Digit-Coded Card Validation really?+

Easy on algorithm, easy to lose points on details. It's O(n) with a few boolean checks. The risk is misreading an index or using >= instead of >. Write the five flags as named variables first and the logic becomes almost mechanical.

What's the trick to the amount 100 edge case?+

Both amount rules are strict. Master unbound needs amount < 100, Master merchant-bound needs amount > 100. At exactly 100 neither fires, so a merchant-bound Master payment returns false. Example 2's last case shows this directly.

Should I convert the card number to an integer?+

No. Treat it as a string and read characters at indices 13, 14, 15. Sixteen digits can overflow some integer types and leading zeros get lost. Compare each character to '1' to get a clean boolean flag.

Does a Visa payment ever use the amount rules for Master?+

No. Visa validity depends only on merchant-bound plus multi-use, or an online charge under 100. Master uses the two amount rules. Branch on the index 14 flag first, then apply only that card type's conditions.

How do I prepare for this in 48 hours?+

Practice string indexing and boolean rule translation, not heavy algorithms. Hand-trace the three examples, especially the amount 100 case. Check the return array matches input order. That covers nearly everything this Capital One question can throw at you.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Capital One.

OA at Capital One?
Invisible during screen share
Get it