Counting interview questions
97 counting problems tagged across recent interview reports. Drilled most heavily by paypal, roblox, and atlassian.
Counting is the most deceptively simple pattern: track frequency of elements and make decisions based on those counts. With 97 problems tagged on this pattern, it's everywhere. PayPal, Roblox, and Atlassian hammer candidates on counting variants, from anagram detection to divisibility checks. Most engineers underestimate it because the core mechanic is trivial, hash map, loop, compare, but the gotchas pile up fast in live assessments. StealthCoder solves counting problems in real time when you're stuck on a tricky constraint or edge case.
Most-asked counting problems
Showing top 50 of 97 counting problems by # companies asking.
You can't drill every counting variant before the assessment. StealthCoder runs invisibly during screen share and solves whichever variant they throw at you. No browser extension. No detection signature. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.
Get StealthCoderCounting problems fall into three rough categories: frequency matching (do two strings have the same character counts), constraint satisfaction (do element frequencies meet some divisibility or parity rule), and reconstruction (build an output respecting frequency limits). Recognition is straightforward: if the problem asks 'how many', 'does every element appear exactly', or 'are these two things equivalent ignoring order', you're likely counting. The subtlety is in the constraint, sometimes you need counts alone, sometimes counts plus indices, sometimes counts plus the rule that you can swap or rearrange. Start with anagram and divisibility variants, then move to multi-character constraints like Bulls and Cows or string compression. When a hard counting variant hits your live OA and you're second-guessing the data structure or missing a parity edge case, StealthCoder reads the problem and delivers the solution invisibly.
Companies that hire most on counting
97 counting problems.
You won't drill them all. Pass anyway.
Counting is one of the patterns interviews actually filter on. Memorizing every variant in a week is a fantasy. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds, no matter which counting flavor lands in your live OA. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Counting interview FAQ
How many counting problems should I drill before an OA?+
Aim for 20-30. Start with basic anagram and frequency matching (Bulls and Cows, Check if Anagrams), then move to constraint variants (divisibility, digit counts). Counting is foundational; it shows up as a subproblem in many other patterns, so reps here pay compound dividends.
Which companies drill counting the hardest?+
PayPal, Roblox, Atlassian, and Goldman Sachs all have 13+ counting problems in their interview pools. Counting is especially common in fintech and payments (PayPal, Goldman Sachs) because of its ties to divisibility and parity checks on transaction data.
How do I recognize a counting problem in real time?+
Look for questions about frequency, equality of distributions, or whether two inputs are equivalent ignoring order. Keywords: 'anagram', 'character count', 'divisible by', 'equal occurrences', 'valid rearrangement'. If you're building a frequency map in your head, you're on a counting problem.
Do I need a hash map every time?+
Usually, yes. Hash maps (dicts in Python) are standard for O(n) frequency tracking. Edge cases: if the input is a small fixed alphabet (26 letters, 10 digits), an array works. If order matters and you need indices alongside counts, pair frequency maps with index tracking.
What's the hardest variant of counting I'll see?+
Multi-constraint problems like Check if Array Pairs are Divisible by K, where you must count pairs and ensure each pair's sum is divisible. These require frequency maps plus modular arithmetic logic. Drill constraint-based counting last.