Hackerrank Compress the String solution in C
This is a(n):
- [x] New algorithm
- [ ] Update to an existing algorithm
- [ ] Error
- [x] Proposal to the Repository
Details:
In this task, we would like for you to appreciate the usefulness of the groupby() function of itertools. You are given a string . S Suppose a character 'c' occurs consecutively X times in the string. Replace these consecutive occurrences of the character 'c' with (X,c) in the string.
For a better understanding of the problem, check the explanation. Input Format
A single line of input consisting of the string .
Output Format
A single line of output consisting of the modified string.
Constraints
All the characters of denote integers between and . Sample Input=>
1222311
Sample Output=>
(1, 1) (3, 2) (1, 3) (2, 1)
I want to solve this problem.
pls assign this issue to me. I can solve it.
@shubha028 i start work on this issue