Count Triple
Reported by candidates from ZipRecruiter's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
ZipRecruiter's Count Triple hit candidates in February 2024, and it's a counting problem hiding under a simple name. You get an array and need to count how many times a specific pattern appears. The trap is thinking too hard about it. It's pure iteration and conditional matching. If you blank during the live OA, StealthCoder will parse the exact condition and walk you through the loop structure in real time, so you won't lose points to a mental block.
Pattern and pitfall
Count Triple is a straightforward array traversal with a counter. The pattern is almost certainly 'find all instances where three consecutive or related elements match a condition.' The common mistake is off-by-one errors in your loop bounds or misreading which elements to compare. You'll iterate once through the array, check your condition on each valid window, and increment a counter. It's O(n) time, O(1) space. The real test is whether you read the condition correctly. During the assessment, if the wording trips you up, StealthCoder catches the exact requirement and shows you the comparison logic instantly. No second-guessing, no wasted minutes.
If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.
You can drill Count Triple 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 StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass ZipRecruiter's OA.
ZipRecruiter 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.
Count Triple FAQ
Is this a hard problem?+
No. It's easy to medium at most. You're counting, not optimizing or searching. The difficulty lives in reading the problem statement carefully and avoiding off-by-one errors in your loop. Most candidates who fail it rushed the setup.
What's the main gotcha?+
Misunderstanding which three elements to compare. Read the problem twice. The condition is the whole game here. Once you nail the condition, the code is five lines.
How do I prepare in 24 hours?+
Practice writing a simple loop that checks windows of fixed size in an array. Trace through one example by hand. That's enough. If you can count occurrences of a pattern, you're ready.
What if I see 'triple' and think of something else?+
The word 'triple' here means three things in a row or three elements matching a rule. It's not about exponents or powers. Read the full problem statement before coding.
Is this pattern still asked at ZipRecruiter?+
Yes. Counting problems and basic array iteration are baseline. Companies use them to filter out candidates who can't read specs or write clean loops. You should be able to solve this in under 10 minutes cold.