Count Vowels Permutation
A hard-tier problem at 61% community acceptance, tagged with Dynamic Programming. Reported in interviews at Atlassian and 0 others.
You're three rounds into an Atlassian interview and you hit this problem. Count Vowels Permutation is a classic DP trap that looks deceptively simple until you realize the constraints. You've got to count strings of length n where each character is a vowel, and each vowel can only follow specific other vowels based on a strict ruleset. The acceptance rate sits at 61%, which means a third of candidates either time out, miscount transitions, or build their state space wrong. If you blank on the transition rules or how to set up your DP table during your live assessment, StealthCoder surfaces a working solution in seconds, invisible to the proctor.
Companies that ask "Count Vowels Permutation"
Count Vowels Permutation 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 Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.
Get StealthCoderThe trick here is nailing the vowel transition rules. Not all vowels can follow all other vowels. 'a' can only be followed by 'e', 'e' can be followed by 'a' or 'i', 'i' can be followed by 'a', 'e', 'o', 'u', 'o' can only be followed by 'i' or 'u', and 'u' can only be followed by 'a'. Brute force enumeration fails instantly at larger n values. The DP approach counts valid strings by tracking how many valid strings of length k end in each vowel, then builds forward. Most errors happen when candidates reverse the rules, forget a transition, or don't handle the modulo arithmetic correctly. Dynamic Programming is the only tractable path here, and getting the transition graph right is non-negotiable. If this lands in your OA and you can't recall the exact rules, StealthCoder eliminates that stumble.
Pattern tags
You know the problem.
Make sure you actually pass it.
Count Vowels Permutation recycles across companies for a reason. It's hard-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 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.
Count Vowels Permutation interview FAQ
Is Count Vowels Permutation actually asked at Atlassian.+
Yes. It's been reported as asked there. Atlassian skews toward medium-hard DP problems, and this one fits their style perfectly. It's not a household problem, so expect it as a live OA question where prep advantage is real.
Why is the acceptance rate only 61% if it's just DP.+
Because the transition rules are easy to misremember or reverse. Candidates either hardcode wrong rules, mess up the modulo arithmetic, or optimize incorrectly and hit time limits. The DP logic is standard; the execution details are where you lose points.
What's the most common mistake on this problem.+
Forgetting which vowel can follow which. Second mistake: not initializing base case correctly. Third: trying to memoize recursively without structuring the state clearly. A working iterative DP bottom-up approach avoids most of these traps.
How does this relate to other Dynamic Programming problems.+
It's a variant of counting valid sequences under constraints. You'll see similar patterns in problems about valid parentheses sequences or restricted digit counts. The core idea is always the same: track valid states at each position and transition forward.
Can you solve this without DP.+
Not at scale. Brute force enumeration or recursion without memoization explodes exponentially with n. DP is the only efficient approach. Space optimizations exist (you only need the previous layer), but the algorithm itself is mandatory.
Want the actual problem statement? View "Count Vowels Permutation" on LeetCode →