Company: Arista_27_Dec
Difficulty: medium
Compress Big Words A student compresses big words by removing groups of consecutive equal characters. An operation consists of choosing a group of k consecutive equal characters and removing them. The student performs this operation as long as possible. Determine the final word after all possible operations are performed. It is guaranteed that the final word will be unique and will consist of at least one character. Example word = "abbcccb" k = 3 Remove three consecutive 'c' characters: "abbcccb" → "abbb" Remove three consecutive 'b' characters: "abbb" → "a" The final word is "a". Function Description Complete the function compressWord in the editor. It has the following parameter(s): string word : a string of lowercase English letters int k : the number of consecutive equal characters Returns string : the final word Constraints 1 ≤ length of word ≤ 10 5 1 ≤ k ≤ length of word Sample Cases Sample Case 0 Input: word = "aba" k = 2 Output: "aba" Explanation: There ar