Reported September 2026
Akuna Capitalbrainteaser

Vowel Substring Game

Reported by candidates from Akuna Capital's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Akuna Capital OA. Under 2s to a working solution.
Founder's read

The Vowel Substring Game showed up in an Akuna Capital OA reported in September 2026, and the naive solution is exactly what the problem wants you to write. Simulating two players removing substrings from strings up to 10^5 characters long will die on the first big test. The edge case is the string with zero vowels, where Alex can't move at all. It looks like a game theory problem with a sliding window flavor. It's actually a brainteaser with a one-line answer. If you blank on the insight during the live OA, StealthCoder runs invisibly as a safety net and surfaces it.

The problem

You are given an array datasets of strings. For each string, two engineers play a turn-based game by repeatedly removing substrings under the following rules:
Alex moves first and may remove any substring containing an odd number of vowels
Chris moves next and may remove any substring containing an even number of vowels
They continue alternating turns in the same manner
Both play optimally
The player who removes the last valid substring wins
Note:
Vowels are 'a', 'e', 'i', 'o', and 'u'
For each string, determine which engineer wins and return the result accordingly.

Function
determineWinners(datasets: String[]) → String[]

Examples
Example 1
datasets = ["git", "dry"]
return = ["Alex", "Chris"]
Given n = 2 and datasets = ["git", "dry"]
For the datasets[0] = "git", Alex removes the entire string, leaving it empty. Since no valid moves are left, Chris cannot make a move, and Alex performs the final removal.
For the datasets[1] = "dry", the string contains no vowels. Since Alex cannot make any moves, Chris is considered to have made the final removal.
Hence the answer is ["Alex", "Chris"].
Example 2
datasets = ["lgzpc", "lchxlo", "xnwzg"]
return = ["Chris", "Alex", "Chris"]
Sample Input For Custom Testing
STDINFUNCTION
3
lgzpc
lchxlo
xnwzg
datasets[] size n
datasets = ["lgzpc", "lchxlo", "xnwzg"]
Sample Output
Chris
Alex
Chris
Explanation
Chris takes the first and third datasets which contain no vowels. Since Alex cannot make a move, Chris is considered to have made the final valid removal.
In the second dataset, datasets[1] = "lchxlo", there is exactly one vowel. Alex removes the entire string.

Constraints
1 ≤ n ≤ 100
1 ≤ |datasets[i]| ≤ 10^5
All strings in the datasets consist of lowercase English letters only.

Reported by candidates. Source: FastPrep

Pattern and pitfall

Here's the trick. If the string has no vowels, Alex has no legal move, so Chris wins. If the total vowel count is odd, Alex removes the whole string and wins immediately. If the count is even and above zero, Alex removes a substring with an odd number of vowels (say, up to and including the first vowel), leaving an odd count behind. From there Alex can always answer Chris's move to keep control, so Alex still wins. So the answer collapses to one check: any vowel means Alex, none means Chris. The pitfall is building a DP or simulation over substrings, which is far too slow at 10^5 characters and 100 strings. A single pass per string is enough. If the reasoning doesn't click under pressure, StealthCoder is the hedge that hands you the shortcut live.

Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.

If this hits your live OA

You can drill Vowel Substring Game 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. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Akuna Capital's OA.

Akuna Capital reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Vowel Substring Game FAQ

What's the actual trick in the Akuna Capital Vowel Substring Game?+

Alex wins if the string contains at least one vowel, and Chris wins otherwise. Odd vowel total means Alex removes everything. Even and nonzero means Alex removes an odd-vowel substring and keeps the advantage. You don't simulate anything. Just scan each string once and check for a vowel.

How hard is this problem really?+

The code is trivial, the insight isn't. Most people burn time on game simulation or DP before noticing the pattern. Once you see that only vowel presence matters, it's a few lines. The difficulty is resisting the urge to model every possible move.

What edge cases should I test?+

Test a string with no vowels like "dry", which gives Chris. Test exactly one vowel, where Alex takes the whole string. Test an even vowel count like two vowels, which still gives Alex. Also test a 10^5 length string to confirm your approach is linear and doesn't build substrings.

What's the time complexity I should aim for?+

O(total length of all strings). Each string needs one pass to check for any of a, e, i, o, u, and you can stop at the first vowel. With n up to 100 and strings up to 10^5, that's about 10^7 character checks at most. Anything quadratic will time out.

How do I prepare for this in 48 hours?+

Don't grind game theory broadly. Practice recognizing when optimal-play games reduce to a parity or existence check. Work through small cases by hand, list who wins for 0, 1, 2, and 3 vowels, and the pattern shows up fast. Then write the clean one-pass function and test the no-vowel case.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Akuna Capital.

OA at Akuna Capital?
Invisible during screen share
Get it