EASYasked at 2 companies

Count Largest Group

A easy-tier problem at 75% community acceptance, tagged with Hash Table, Math. Reported in interviews at Mercari and 1 others.

Founder's read

Count Largest Group is the deceptively simple problem that trips up candidates who overthink it. You're given integers, you bucket them by digit sum, and you return the size of the biggest bucket. Mercari and Bloomberg both ask it. The acceptance rate is 75%, which sounds safe until you realize that's because most people who attempt it get it right on first try, or fail immediately on a conceptual misread. The trick isn't hard once you see it, but if you blank on the grouping strategy during the OA, StealthCoder surfaces the solution in seconds while the proctor sees nothing.

Companies asking
2
Difficulty
EASY
Acceptance
75%

Companies that ask "Count Largest Group"

If this hits your live OA

Count Largest Group 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 pattern is straightforward: iterate through the input, compute the sum of digits for each number, use a hash table to count how many numbers share the same digit sum, then return the maximum count. Candidates typically stumble on one of two fronts. First, they misread and try to group by individual digits instead of digit sums. Second, they compute digit sum correctly but then write verbose code to track both the groups and their sizes separately. The efficient path is a single hash table pass. If you've seen this shape before, you write it in two minutes. If you haven't, you might second-guess the problem statement under timed pressure. StealthCoder is the hedge for that moment. Hash Table and Math are the listed topics, and both apply cleanly here.

Pattern tags

The honest play

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

Count Largest Group 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.

Count Largest Group interview FAQ

Is this actually asked at real companies?+

Yes. Mercari and Bloomberg both report asking it. The 75% acceptance rate means it's genuinely easy once you understand the ask, but a small fraction of candidates misinterpret the grouping logic or overcomplicate the solution.

What's the trick that makes this pass or fail?+

Digit sum grouping, not digit grouping. Many candidates read 'group' and think individual digits first. The real move is a single hash table: map digit sum to count, then return the max count. That's the entire algorithm.

How does hash table apply here?+

You use it to count frequency of digit sums across all input numbers. In one pass, you compute each number's digit sum as a key and increment its count. Then extract the max value. That's your hash table use case.

Will I see this again after passing it once?+

Unlikely in the same form, but the digit-sum-as-key pattern appears in other assessment problems. Once you've written it once, it sticks. The real value is the speed and confidence boost on test day.

How do I avoid the grouping misread?+

Reread the problem statement carefully. 'Largest group' means the group with the most members, not the highest digit value. A trace-through on a small example before coding locks in the intent and saves backtracking under pressure.

Want the actual problem statement? View "Count Largest Group" 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.