LeetCode/NeetCodeRoadmap/Arrays_and_Hashing/Encode_Decode_Strings.py

14 lines
271 B
Python

def encode(strs):
# write your code here
key = []
encode = []
for x in strs:
if x in key:
encode.append(x)
"""
@param: str: A string
@return: decodes a single string to a list of strings
"""
def decode(str):
# write your code here