EASYasked at 1 company

Maximum 69 Number

A easy-tier problem at 82% community acceptance, tagged with Math, Greedy. Reported in interviews at Hudson River Trading and 0 others.

Founder's read

Maximum 69 Number is an easy problem that Hudson River Trading has asked, but don't sleep on it just because the difficulty tag says easy. You'll see it in live assessments and it tests whether you think greedily or burn time on overthinking. The core task is simple: flip one 6 to a 9 in a number to maximize its value. The 80% acceptance rate reflects that most people solve it, but the ones who nail it in under two minutes are the ones who spot the greedy pattern immediately. If this problem hits your assessment and you blank on the approach, StealthCoder surfaces a working solution in seconds, invisible to the proctor.

Companies asking
1
Difficulty
EASY
Acceptance
82%

Companies that ask "Maximum 69 Number"

If this hits your live OA

Maximum 69 Number is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage.

Get StealthCoder
What this means

The trick here is greedy: scan left to right and flip the first 6 you find to a 9. Stop. That's it. Most candidates either overthink it (comparing all possible flips, which is unnecessary) or they iterate all the way through and flip the last 6 they see (which is wrong). The greedy approach works because you want the highest digit in the highest place value. Flipping a 6 in the tens place gives you 30 extra; in the hundreds place, 300 extra. Go left and quit early. Implementation is trivial: convert to string, find the first '6', replace it, convert back. Some will convert to a list and loop; some will use string methods. All valid. The real edge is recognizing that you only need one flip and you want it in the leftmost position. When you hit this in a live OA, StealthCoder handles the code generation so you stay calm and move on.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Maximum 69 Number recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Maximum 69 Number interview FAQ

Is this problem still asked at top firms like Hudson River Trading?+

Yes. It's in Hudson River Trading's reported question set. Easy problems are often screening gates to test if you code cleanly and think through logic fast. An 80% acceptance rate means it's genuinely solvable, but speed and correctness still separate candidates.

What's the trick to solving Maximum 69 Number in under two minutes?+

Greedy: find and flip only the first 6 from the left. Don't loop through all digits or compare multiple flips. One pass, one replacement, done. The math behind it is simple: you want the flip in the highest place value, so go left to right and stop at the first 6.

How does this problem relate to Greedy algorithms?+

It's the canonical easy greedy example. You make a locally optimal choice (flip the leftmost 6) that guarantees a globally optimal answer (maximum value). No backtracking or dynamic programming needed. Pure greedy logic.

What's the most common mistake people make on this problem?+

Either flipping the last 6 instead of the first, or flipping all 6s instead of just one. Both stem from not thinking greedily about place value. Some also over-engineer the solution when a single string find-and-replace works perfectly.

Does this problem test Math or Greedy more heavily?+

Both are tagged, but Greedy is the core. The Math part is basic: understand that 69 is larger than 69 by exactly (9-6) times 10^position. Greedy is what makes you stop early and pick the right position to flip.

Want the actual problem statement? View "Maximum 69 Number" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.