Design an algorithm to encode a list of strings to a single string and decode it back.
Design an algorithm to encode a list of strings into a single string for transmission, and decode it back to the original list. Strings may contain any characters.
Examples
Input:["lint","code","love","you"]
Output:["lint","code","love","you"]
Input:["we say : yes"]
Output:["we say : yes"]
Hints
Use a length prefix: encode as "length#string".
When decoding, read the length first, then extract that many characters.