Design an algorithm to encode a list of strings to a single string, and decode it back.
Input: strs = ["leet","code","love","you"]
Output: ["leet","code","love","you"]
Topics: arrays
Asked by: Google, Amazon
Time complexity: O(N). Space complexity: O(N).