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: ["a",[]]
Output: "a"
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.