Decrypt the String from Digits to Letters

Published by Mubashir Hassan in

Given a string s consisting from digits and #, translate s to English lowercase characters as follows:

  • Characters ("a" to "i") are represented by ("1" to "9").
  • Characters ("j" to "z") are represented by ("10#" to "26#").

Examples

decrypt("10#11#12") ➞ "jkab"

decrypt("1326#") ➞ "acz"

decrypt("25#") ➞ "y"

Notes

N/A

Watch a quick demo on how Edabit works.