The Encoded Signal
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Interview Prompt
A device firmware emits letter-frequency telemetry as a compact code with no literal letters in it, and you expand it into counts for the 26 lowercase letters a through z. A single digit from 1 to 9 names one of the first nine letters (`1` is a, `9` is i); two digits immediately followed by `#` name a letter by its position, so `10#` is j, `24#` is x, and `26#` is z. Either kind of letter token may carry a parenthesized count for how many times it occurs, like `1(3)` for three a's, while a bare token counts once, and repeated letters accumulate across the string. Return a 26-element list of totals, position 0 for a through position 25 for z.
Summary
Letters folded into digits, counts hidden in the punctuation.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision