MEDIUMasked at 3 companies

Reconstruct Original Digits from English

A medium-tier problem at 52% community acceptance, tagged with Hash Table, Math, String. Reported in interviews at NetApp and 2 others.

Founder's read

You're given a string of English words spelling out digits (like 'twozeroone'), and you need to reconstruct the original number in sorted order. It's a tricky string-parsing problem that hits your brain sideways because the obvious approach, pattern matching each digit word, fails when words overlap. NetApp, Wix, and Salesforce have all asked this. The acceptance rate sits at 52 percent, which means half the candidates walk away stuck. If you see this live and freeze on the parsing trick, StealthCoder runs invisibly during your assessment and surfaces the working solution in seconds.

Companies asking
3
Difficulty
MEDIUM
Acceptance
52%

Companies that ask "Reconstruct Original Digits from English"

If this hits your live OA

Reconstruct Original Digits from English 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 StealthCoder
What this means

The trap is thinking you can just count occurrences of 'zero', 'one', 'two', etc. independently. The real pattern is that some digit words are unique and others aren't. 'Zero', 'two', 'four', 'six', and 'eight' are unique substrings within the entire set. You extract those first, then use the remaining letter counts to back out the overlapping digits like 'three', 'five', 'nine', and 'one'. It's a Hash Table and Math problem disguised as string parsing. You're essentially solving a system of equations where each digit's English word contributes to the overall letter frequency. When you hit this in a live assessment, the aha moment arrives fast if you've seen the trick, or not at all if you haven't. StealthCoder is your hedge for the second scenario.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Reconstruct Original Digits from English 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 realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Reconstruct Original Digits from English interview FAQ

Why can't I just count how many times each digit word appears?+

Because digit words overlap in the global letter set. 'Five' shares letters with 'seven', 'one' appears in 'seven' and 'eight'. You can't isolate them independently. The solution extracts unique-signature digits first, then reverse-engineers the rest from letter counts.

Is this problem still asked at Salesforce and Wix?+

Yes. It appears in reports from both companies, along with NetApp. It's a Medium-difficulty problem that shows up regularly in coding assessments, especially for roles that value string manipulation and mathematical reasoning.

What's the actual trick to solving this efficiently?+

Identify which digit words have unique letters or letter-counts within the set. Extract 'zero', 'two', 'four', 'six', 'eight' first because they're unambiguous. Then use the remaining letter frequencies to calculate 'three', 'five', 'nine', and 'one'. It's a Hash Table problem, really.

How is this different from a standard substring matching problem?+

Standard substring matching assumes clean, non-overlapping patterns. Here, words like 'one', 'seven', and 'eight' all share the letter 'e'. You're solving a constraint satisfaction problem, not just searching. Math and deduction drive the solution.

Will I have time to figure out the pattern during the assessment?+

Depends on whether you've seen it. Most candidates don't realize the unique-digit extraction trick before coding. If you blank on it, you'll either waste 15 minutes or timeout. That's where a real-time solution from StealthCoder saves your score.

Want the actual problem statement? View "Reconstruct Original Digits from English" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.