Encode and Decode Strings
You need two matching routines:
encode: turn a list of strings into one stringdecode: rebuild the original list from that encoded text
The transformation must be reversible, even when the input strings are empty or contain punctuation, digits, or separator characters.
Examples
Input: [["lint","code","love","you"]]
Output: ["lint"]
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
You need two matching routines: