1528. Shuffle String
https://leetcode.com/problems/shuffle-string
Description
Given a string s and an integer array indices of the same length.
The string s will be shuffled such that the character at the ith position moves to indices[i] in the shuffled string.
Return the shuffled string.
Example 1:

Example 2:
Example 3:
Example 4:
Example 5:
Constraints:
s.length == indices.length == n1 <= n <= 100scontains only lower-case English letters.0 <= indices[i] < nAll values of
indicesare unique (i.e.indicesis a permutation of the integers from0ton - 1).
ac
Last updated
Was this helpful?