Encode and Decode Strings
Design a reversible codec for a list of strings.
encode(strs)turns a list of strings into one encoded string.decode(s)rebuilds the original list from that encoded text.
The transformation must be reversible even when input strings are empty or contain punctuation, digits, spaces, or separator characters. The platform execution entry point for this slug is solve(arg1), where arg1 is the list of strings. A correct solve performs a real encode then decode roundtrip and returns the decoded list (the original list).
Examples
Input: ["lint","code","love","you"]
Output: ["lint","code","love","you"]
Input: [""]
Output: [""]
Hints
Encode each string as length + delimiter + content.
The length acts as a header telling decode how many chars to read.
Choose a delimiter that cannot appear in the strings, or escape it.
Related Problems
Encode and Decode Strings
Design a reversible codec for a list of strings.