does anyone knows the solution?
Anonymous User
269

Given an input length, string array and burst length (>0), the output should be an array such that the sequentially repeating elements more than or equal to the burst length should be removed. This has to be repeated till the array cannot be shrunk any further.

Sample1
Input
8
a b c c c d e e
3

Output: a b d e e

Sample2
Input
15
a b c d e e e e d d c b f g f
3

Output: a b c c b f g f

Comments (3)