Dashboard Temp Share Shortlinks Frames API

HTMLify

LeetCode - Shuffle String - Python
Views: 608 | Author: abh
1
2
3
4
5
6
class Solution:
    def restoreString(self, s: str, indices: List[int]) -> str:
        shuffeld = ""
        for i in range(len(s)):
            shuffeld += s[indices.index(i)]
        return shuffeld