|
3 | 3 | importjava.util.HashMap;
|
4 | 4 | importjava.util.Map;
|
5 | 5 |
|
6 |
| -/** |
7 |
| - * 1309. Decrypt String from Alphabet to Integer Mapping |
8 |
| - * |
9 |
| - * Given a string s formed by digits ('0' - '9') and '#' . We want to map s to English lowercase characters as follows: |
10 |
| - * Characters ('a' to 'i') are represented by ('1' to '9') respectively. |
11 |
| - * Characters ('j' to 'z') are represented by ('10#' to '26#') respectively. |
12 |
| - * Return the string formed after mapping. |
13 |
| - * It's guaranteed that a unique mapping will always exist. |
14 |
| - * |
15 |
| - * Example 1: |
16 |
| - * Input: s = "10#11#12" |
17 |
| - * Output: "jkab" |
18 |
| - * Explanation: "j" -> "10#" , "k" -> "11#" , "a" -> "1" , "b" -> "2". |
19 |
| - * |
20 |
| - * Example 2: |
21 |
| - * Input: s = "1326#" |
22 |
| - * Output: "acz" |
23 |
| - * |
24 |
| - * Example 3: |
25 |
| - * Input: s = "25#" |
26 |
| - * Output: "y" |
27 |
| - * |
28 |
| - * Example 4: |
29 |
| - * Input: s = "12345678910#11#12#13#14#15#16#17#18#19#20#21#22#23#24#25#26#" |
30 |
| - * Output: "abcdefghijklmnopqrstuvwxyz" |
31 |
| - * |
32 |
| - * Constraints: |
33 |
| - * 1 <= s.length <= 1000 |
34 |
| - * s[i] only contains digits letters ('0'-'9') and '#' letter. |
35 |
| - * s will be valid string such that mapping is always possible. |
36 |
| - * */ |
37 | 6 | publicclass_1309 {
|
38 | 7 | publicstaticclassSolution1 {
|
39 | 8 | //TODO: very silly solution, optimze it
|
|