java.lang.Object
g1301_1400.s1309_decrypt_string_from_alphabet_to_integer_mapping.Solution

public class Solution extends Object
1309 - Decrypt String from Alphabet to Integer Mapping.<p>Easy</p> <p>You are given a string <code>s</code> formed by digits and <code>'#'</code>. We want to map <code>s</code> to English lowercase characters as follows:</p> <ul> <li>Characters (<code>'a'</code> to <code>'i')</code> are represented by (<code>'1'</code> to <code>'9'</code>) respectively.</li> <li>Characters (<code>'j'</code> to <code>'z')</code> are represented by (<code>'10#'</code> to <code>'26#'</code>) respectively.</li> </ul> <p>Return <em>the string formed after mapping</em>.</p> <p>The test cases are generated so that a unique mapping will always exist.</p> <p><strong>Example 1:</strong></p> <p><strong>Input:</strong> s = &ldquo;10#11#12&rdquo;</p> <p><strong>Output:</strong> &ldquo;jkab&rdquo;</p> <p><strong>Explanation:</strong> &ldquo;j&rdquo; -> &ldquo;10#&rdquo; , &ldquo;k&rdquo; -> &ldquo;11#&rdquo; , &ldquo;a&rdquo; -> &ldquo;1&rdquo; , &ldquo;b&rdquo; -> &ldquo;2&rdquo;.</p> <p><strong>Example 2:</strong></p> <p><strong>Input:</strong> s = &ldquo;1326#&rdquo;</p> <p><strong>Output:</strong> &ldquo;acz&rdquo;</p> <p><strong>Constraints:</strong></p> <ul> <li><code>1 <= s.length <= 1000</code></li> <li><code>s</code> consists of digits and the <code>'#'</code> letter.</li> <li><code>s</code> will be a valid string such that mapping is always possible.</li> </ul>
  • Constructor Details

    • Solution

      public Solution()
  • Method Details