Given a string A and integer B, remove all consecutive same characters that have length exactly B.
NOTE : All the consecutive same characters that have length exactly B will be removed simultaneously.
1 <= |A| <= 100000
1 <= B <= |A|
First Argument is string A.
Second argument is integer B.
Return a string after doing the removals.
A = "aabcd" B = 2
A = "aabbccd" B = 2
"aa" had length 2.
"aa", "bb" and "cc" had length of 2.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.