Encode and Decode a List of Strings
Asked at Amazon · Coding Questions · Difficulty: Medium
Implement a `Codec` class with `encode(strs)` that serializes a list of strings into one string, and `decode(s)` that restores the original list. The encoding must survive any characters (including delimiters) inside the strings.
Loading the problem…