Encode and Decode Strings
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.
Examples
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy