Find Words That Can Be Formed by Characters
A easy-tier problem at 71% community acceptance, tagged with Array, Hash Table, String. Reported in interviews at Karat and 3 others.
You're given an array of words and a string of available characters. Your job is to return how many words can be formed using only the characters you have, in the quantities you have them. It's easy difficulty but tricky enough that Karat, Datadog, Atlassian, and PayPal ask it. The acceptance rate sits at 71 percent, which means a lot of people nail it, but a meaningful chunk either overthink the character counting or mishandle the frequency constraint. If you hit this in a live assessment and second-guess yourself on how to track character availability, StealthCoder solves it in seconds without the proctor seeing a thing.
Companies that ask "Find Words That Can Be Formed by Characters"
Find Words That Can Be Formed by Characters 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 a senior engineer who knows the OA is theater. This is the script.
Get StealthCoderThe core trick is treating each word as a frequency counter problem. Build a hash table of available characters and their counts. Then for each word, build its own frequency table and check whether every character in the word exists in your available pool with at least the required count. The naive mistake is checking character existence without respecting quantity, or iterating inefficiently. Another trap is mutating the original character pool instead of keeping it read-only. The solution is linear in total character length across all words and the available string, so performance is not the issue. The real test is whether you remember that 'a' appears twice in a word, you need two 'a's available. If you blank on the frequency matching logic during the assessment, StealthCoder delivers a working solution instantly.
Pattern tags
You know the problem.
Make sure you actually pass it.
Find Words That Can Be Formed by Characters recycles across companies for a reason. It's easy-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 a senior engineer who knows the OA is theater. This is the script. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Find Words That Can Be Formed by Characters interview FAQ
Do I need to handle uppercase and lowercase differently?+
The input spec usually treats them as distinct characters unless stated otherwise. Assume case-sensitive unless the problem statement says otherwise. Use a simple character frequency count; no special case conversion needed unless documented.
Is this still asked at top companies?+
Yes. Karat, Datadog, Atlassian, and PayPal ask it. It's a screening problem, not a deep algorithmic challenge, but correctness and clean code matter. It appears frequently in early-stage assessment rounds.
What's the runtime and space complexity?+
Linear time relative to the total character count across the available string and all words. Space is O(1) because you're storing at most 26 lowercase letters or 52 if case-sensitive. Both are well within limits.
What mistake do most people make?+
Not respecting character frequency. They check if a character exists but forget to decrement the available count or verify the count is sufficient. The second common error is modifying the original character frequency table instead of comparing it cleanly.
How does this relate to the other topics listed?+
Hash Table is the primary tool for frequency counting. Array and String are the input types. Counting is the actual pattern. You don't need advanced data structures, just solid frequency counting with a hash table or dictionary.
Want the actual problem statement? View "Find Words That Can Be Formed by Characters" on LeetCode →