This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
how could i fix this methodehich must accept a String consisting of a run-length encoding of a sequence of any characters except digit
characters ('0' - '9'), and return the corresponding
non-encodedString. In a run-length encoding each "run" which represent by the number of repetitions followed by the repeated character.
Examples:
"" is decoded as ""
"1a1b1c" is decoded as "abc"
"3a" is decoded as "aaa"
"3a2b4c" is decoded as "aaabbcccc"
"5x14y1z" is decoded as "xxxxxyyyyyyyyyyyyyyz"
public String decode(String es) {
miguel winzo wrote:how could i fix this methodehich must accept a String consisting of a run-length encoding of a sequence of any characters except digit
characters ('0' - '9'), and return the corresponding
non-encodedString. In a run-length encoding each "run" which represent by the number of repetitions followed by the repeated character.
Examples:
"" is decoded as ""
"1a1b1c" is decoded as "abc"
"3a" is decoded as "aaa"
"3a2b4c" is decoded as "aaabbcccc"
"5x14y1z" is decoded as "xxxxxyyyyyyyyyyyyyyz"
public String decode(String es) {
What method? Your post must not have worked as I only see a method fragment on the bottom.