Company: Ubs_10march
Difficulty: medium
Optimize Data Cleaning Problem Description In a data cleaning pipeline, engineers optimize text datasets by alternately removing substrings: Alex removes substrings with an odd number of vowels in the first step, followed by Chris removing substrings with an even number of vowels in the next step. Alex always goes first, then the engineers take turns optimally until no valid substring remains. The goal is to determine which engineer removes the last substring. Implement a function optimizeDataCleaning to determine the outcome of the cleaning process for each dataset, assuming alternating and optimal cleaning. The function optimizeDataCleaning takes the following input: vector<string> datasets Each string represents a dataset. The function should return an array of strings specifying the result of the cleaning process for each dataset. Note: Vowels are 'a', 'e', 'i', 'o', and 'u'. Examples Example: Given n = 2 and datasets = ["git", "dry"] For the datasets[0] = "git" , Alex remove