Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings.
30:00
Java
Encode and Decode Strings
medium
Topics
Companies
Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings.
Example 1:
Input: {"strs":["lint","code","love","you"]}
Output: ["lint","code","love","you"]
Constraints:
1≤strs.length≤200
0≤strs[i].length≤200
strs[i] contains any possible characters out of 256 valid ASCII characters.