[LeetCode] 1528. Shuffle String
Python
class Solution:
def restoreString(self, s: str, indices: List[int]) -> str:
answer = list(s)
index = 0
for i in indices:
answer[i] = s[index]
index += 1
return "".join(answer)
댓글남기기