Reported June 2025
PayPaymath

Find Maximum Two-Digit Fragment

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

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

PayPay threw this at candidates in June and it's deceptively simple on the surface. You're hunting for the maximum two-digit fragment in some input, and the trick isn't what most people code first. The math pattern is real, but the edge cases around what counts as a valid fragment will trip you if you don't nail the definition upfront. This is exactly the kind of problem where StealthCoder becomes your safety net if you blank on the extraction logic during the live OA.

Pattern and pitfall

The core move here is understanding what 'two-digit fragment' means in PayPay's context. Most candidates assume it's any consecutive substring of exactly two digits, but you need to verify the constraint carefully. Once you lock that down, the algorithm is straightforward: scan through the input, extract all valid two-digit substrings, convert to integers, and return the maximum. The math pattern likely refers to digit manipulation or numerical comparison rather than heavy algorithmic complexity. The pitfall is sloppy boundary handling or misinterpreting what 'fragment' means. If you freeze on the extraction logic live, StealthCoder will feed you the pattern instantly so you don't waste time debugging off-by-one errors.

If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.

If this hits your live OA

You can drill Find Maximum Two-Digit Fragment 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 would have shipped this the night before his JPMorgan OA if he'd had it.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

PayPay reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Find Maximum Two-Digit Fragment FAQ

What counts as a two-digit fragment here?+

A fragment is a consecutive substring of exactly two characters, both digits (0-9). It doesn't need to form a valid number by other rules, just be two digit characters in a row. Clarify this with the problem statement before coding.

Do I need to handle non-digit characters in the input?+

Most likely yes. If the input contains letters or symbols, only consecutive pairs of actual digits count. Scan linearly and skip anything that breaks the digit sequence.

Can the same fragment appear multiple times?+

Yes, but you only care about the maximum value. If '99' appears five times, the answer is still 99. Don't track frequency, just grab the biggest number.

What if there are no two-digit fragments?+

Return -1, null, or whatever the problem specifies for 'no valid result'. Read the exact requirement. Some problems want an empty list, others a sentinel value.

Is this really a math problem or just string manipulation?+

It's math in disguise. You're comparing integers numerically, not lexicographically. '9' vs '10' sorted as strings would put '10' first, but numerically 10 is larger. That's the trick.

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

OA at PayPay?
Invisible during screen share
Get it