Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fe5e61c

Browse files
committed
decrypt-string-from-alphabet-to-integer-mapping
1 parent 660519b commit fe5e61c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def freqAlphabets(self, s: str) -> str:
3+
decrypt_dict1={'10#':'j','11#':'k','12#':'l','13#':'m','14#':'n','15#':'o','16#':'p','17#':'q','18#':'r','19#':'s','20#':'t','21#':'u','22#':'v','23#':'w','24#':'x','25#':'y','26#':'z'}
4+
decrypt_dict2={'1':'a','2':'b','3':'c','4':'d','5':'e','6':'f','7':'g','8':'h','9':'i'}
5+
for key,value in decrypt_dict1.items():
6+
s=s.replace(key,value)
7+
for key,value in decrypt_dict2.items():
8+
s=s.replace(key,value)
9+
return s
10+
11+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /