We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d81cc20 commit 93d393fCopy full SHA for 93d393f
encode-and-decode-strings/hu6r1s.py
@@ -0,0 +1,14 @@
1
+class Solution:
2
+ """
3
+ @param: strs: a list of strings
4
+ @return: encodes a list of strings to a single string.
5
6
+ def encode(self, strs):
7
+ return "secretKey!@#".join(strs)
8
+
9
10
+ @param: str: A string
11
+ @return: decodes a single string to a list of strings
12
13
+ def decode(self, str):
14
+ return str.split("secretKey!@#")
0 commit comments