You are given a 0-indexed string `s` and a 0-indexed integer array `spaces` holding indices of `s`. Insert a space before each character `s[spaces[k]]`, so the space ends up right before that character, and return the modified string. For example, for `s = "EnjoyYourCoffee"` and `spaces = [5, 9]`, spaces go before `"Y"` and `"C"`, giving `"Enjoy Your Coffee"`.
You are given a 0-indexed string s and a 0-indexed integer array spaces holding indices of s. Insert a space before each character s[spaces[k]], so the space ends up right before that character, and return the modified string. For example, for s = "EnjoyYourCoffee" and spaces = [5, 9], spaces go before "Y" and "C", giving "Enjoy Your Coffee".