Design an algorithm to encode a list of strings to a single string and decode that single string back to the original list.
The encoded string is sent over the network and decoded on the other side; there is no restriction on the encoding/decoding algorithm. Your encode and decode functions must be inverses of each other.
Input: strs = ["neet", "code", "love", "you"] Output: ["neet", "code", "love", "you"] Explanation: After encoding and decoding, the original list is recovered exactly.
Input: strs = ["we", "say", ":", "yes"] Output: ["we", "say", ":", "yes"] Explanation: Special characters like ":" must survive the round-trip without being misinterpreted.
strs[i] contains any possible character, including the empty string.strs = ["neet", "code", "love", "you"]