Adding Spaces to String

Given a string and an array of indices, insert a space before each index. Return the modified string after adding all spaces.

Examples
Input: ["LeetcodeHelpsMeLearn",[8,13,15]]
Output: "Leetcode Helps Me Learn"
Hints

Adding Spaces to String

Given a string and an array of indices, insert a space before each index. Return the modified string after adding all spaces.