Company: Goldman Sachs_30oct
Difficulty: medium
Array Burst problem Problem Description Given an input string array (`inputArr`) and an integer `burstLength` (where `burstLength > 0`), the task is to shrink the input array. This shrinking process involves removing sequentially repeating elements if the number of consecutive repetitions is greater than or equal to `burstLength`. This removal process must be repeated iteratively until the array cannot be shrunk any further. For simplicity, the string array elements are single characters, as shown in the sample test cases. Examples Example 1: Input: inputArr = ["a", "b", "c", "c", "d", "e", "e", "e"], burstLength = 3 Output: ["a", "b", "d", "e"] Example 2: Input: inputArr = ["a", "b", "c", "c", "d", "e", "e", "e", "e", "d", "c", "b", "g", "f", "f"], burstLength = 3 Output: ["b", "c", "b", "g", "f"] Constraints `burstLength` must be greater than `0`. The elements in `inputArr` are single characters.