1528. Shuffle String
Last updated
Last updated
**Input:** s = "codeleet", indices = [4,5,6,7,0,2,1,3]
**Output:** "leetcode"
**Explanation:** As shown, "codeleet" becomes "leetcode" after shuffling.
**Input:** s = "abc", indices = [0,1,2]
**Output:** "abc"
**Explanation:** After shuffling, each character remains in its position.
**Input:** s = "aiohn", indices = [3,1,4,2,0]
**Output:** "nihao"
**Input:** s = "aaiougrt", indices = [4,0,2,6,7,3,1,5]
**Output:** "arigatou"
**Input:** s = "art", indices = [1,0,2]
**Output:** "rat"