This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingCount how many ways a digit string can be read as letters from 1 to 26.
What this asks
Count how many ways a digit string can be read as letters from 1 to 26.
dp[i] counts prefixes: a valid single digit extends dp[i - 1], a valid pair extends dp[i - 2].
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing