Vowel Spellchecker
A medium-tier problem at 52% community acceptance, tagged with Array, Hash Table, String. Reported in interviews at Grammarly and 0 others.
Grammarly asks this, and it hits different from typical string problems because the naive approach gets you partial credit at best. You're given a list of words and a list of queries, and you need to find the correct spelling or return valid alternatives based on vowel transformations. The trick isn't just matching strings, it's building the right hash table structure so vowel-insensitive lookups happen in constant time. Acceptance rate sits around 52%, which means half the people who attempt it don't nail the data structure choice. If this lands in your Grammarly OA and you freeze on the hash key design, StealthCoder surfaces the working solution instantly, invisible to the proctor.
Companies that ask "Vowel Spellchecker"
Vowel Spellchecker 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 used it to pass JPMorgan's OA and system design loop.
Get StealthCoderThe core issue: you can't brute-force every vowel substitution at query time without blowing up runtime. The solution is to normalize all words (and queries) by replacing vowels with a placeholder, then build a hash table that maps each normalized form to the set of valid originals. When a query comes in, normalize it the same way and look it up. The pitfall most people hit is thinking they need to generate all permutations of vowel swaps for each word, which is exponential and wrong. Instead, you hash the normalized string and store the actual valid words behind it. The topics (Array, Hash Table, String) tell the story: you iterate the words (Array), build a hash structure (Hash Table) keyed on normalized strings (String manipulation). Vowel normalization is the pattern, not fuzzy matching. If this problem catches you mid-assessment with no prep, StealthCoder runs silent, reads the problem, and gives you the normalized-key pattern.
Pattern tags
You know the problem.
Make sure you actually pass it.
Vowel Spellchecker recycles across companies for a reason. It's medium-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 used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Vowel Spellchecker interview FAQ
Why is the naive 'try all vowel swaps' approach wrong?+
Each word has multiple vowels. Generating all permutations of vowel substitutions creates exponential candidates per query. Normalization (replace all vowels with one symbol) reduces it to one lookup per query. Hash table lookup is O(1); permutation generation is O(5^k) where k is vowel count.
How do I handle the three cases: exact match, one-letter edits, and vowel transformations?+
Exact match is a direct lookup. One-letter edits (insert/delete/replace) require generating edits on the fly per query, which is manageable since the alphabet is fixed. Vowel transformation is handled by normalizing both dictionary and query to the same vowel pattern, then set-based lookup.
What's the role of the Hash Table here?+
It maps normalized strings (all vowels replaced with a wildcard) to the set of valid originals. This lets you answer vowel-swap queries in O(1) lookup time after O(n) preprocessing. Without it, you'd check every word per query, which is too slow.
Is Grammarly still asking this, and why does it fit their product?+
Grammarly reported it, and the problem models real spell-checking: exact matches, typos (edits), and phonetic similarity (vowel swaps). Building an efficient spell-check data structure is directly relevant to their core product work.
How much time does preprocessing take vs. query time?+
Preprocessing is O(n * m) where n is words and m is average word length (you normalize each word once). Query time per lookup is O(1) after generation of edit candidates. The trade-off is upfront work to make queries fast, which is typical in spell-checking systems.
Want the actual problem statement? View "Vowel Spellchecker" on LeetCode →