a through i are written as a single digit 1 to 9, and letters j through z as a two-digit number 10 to 26 followed by #.
Given the encoded string cipher, return the original text.
The string is guaranteed to be well-formed, so it decodes in exactly one way.cipher='315#45' → 'code'
3 → c, 15# → o, 4 → d, 5 → e, which spells "code".
cipher='1226#' → 'abz'
There is no '#' after "12", so those are two separate letters, a and b, while "26#" is z.
cipher='10#' → 'j'
cipher consists of digits and the # charactercipher is a valid encoding under the rules abovecipher='315#45'
'code'
Run checks the first 3 tests in your browser. Submit checks all 37 tests on the server, hidden ones included.