easyString 0 views

Decrypt String from Alphabet to Integer Mapping

You are given a string s formed by digits and '#'.

You are given a string s formed by digits and '#'. We want to map s to English lowercase characters as follows:

Return the string formed after mapping.

The test cases are generated so that a unique mapping will always exist.

Decrypt String from Alphabet to Integer Mapping diagram

Example 1

Input: s = "10#11#12"

Output: "jkab"

Explanation: "j" -> "10#" , "k" -> "11#" , "a" -> "1" , "b" -> "2".

Example 2

Input: s = "1326#"

Output: "acz"

Constraints

  • 1 <= s.length <= 1000
  • s consists of digits and the '#' letter.
  • s will be a valid string such that mapping is always possible.

Hints

Companies

No companies reported yet.

Discussion

Sign in to join the discussion.

Loading discussion...

Test results

No test cases yet.