File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .fishercoder .solutions ;
2
+
3
+ /**
4
+ * 1309. Decrypt String from Alphabet to Integer Mapping
5
+ *
6
+ * Given a string s formed by digits ('0' - '9') and '#' . We want to map s to English lowercase characters as follows:
7
+ * Characters ('a' to 'i') are represented by ('1' to '9') respectively.
8
+ * Characters ('j' to 'z') are represented by ('10#' to '26#') respectively.
9
+ * Return the string formed after mapping.
10
+ * It's guaranteed that a unique mapping will always exist.
11
+ *
12
+ * Example 1:
13
+ * Input: s = "10#11#12"
14
+ * Output: "jkab"
15
+ * Explanation: "j" -> "10#" , "k" -> "11#" , "a" -> "1" , "b" -> "2".
16
+ *
17
+ * Example 2:
18
+ * Input: s = "1326#"
19
+ * Output: "acz"
20
+ *
21
+ * Example 3:
22
+ * Input: s = "25#"
23
+ * Output: "y"
24
+ *
25
+ * Example 4:
26
+ * Input: s = "12345678910#11#12#13#14#15#16#17#18#19#20#21#22#23#24#25#26#"
27
+ * Output: "abcdefghijklmnopqrstuvwxyz"
28
+ *
29
+ * Constraints:
30
+ * 1 <= s.length <= 1000
31
+ * s[i] only contains digits letters ('0'-'9') and '#' letter.
32
+ * s will be valid string such that mapping is always possible.
33
+ * */
34
+ public class _1309 {
35
+ public static class Solution1 {
36
+ public String freqAlphabets (String s ) {
37
+ return "" ;
38
+ }
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments