0%
0 / 13 answered

Implementing String Algorithms Practice Test

13 Questions
Question
1 / 13
Q1

Problem: Implement public static String compress(String inputString) using run-length encoding: replace consecutive repeated characters with the character followed by the count (always include the count). Input: one string. Output: compressed string. Example: "aaabbc" -> "a3b2c1". Constraints: $0 \le$ length $\le 10^5$. Given the problem description above, what is the output of the function when given the input "aabccc"?

Question Navigator