Try to solve the Encode and Decode Strings problem.
We'll cover the following
Statement
Create a method, encode
, that converts an array of strings into a single string and then sends it over the network. Create another method, decode
, that takes the encoded string and converts it back into the original array of strings.
Constraints:
-
strings.length
-
strings[i].length
strings[i]
consist of any possible combinations of characters from 256 valid ASCII characters.