Problem
- Leetcode 1528. Shuffle String
- Level: Easy
- Link
My Code
class Solution(object):
def restoreString(self, s, indices):
listShuffle = list(s)
for x in range(len(s)):
listShuffle[indices[x]] = s[x]
return ''.join(listShuffle)
'개발공부 > algorithm' 카테고리의 다른 글
[백준][python] 1439: 뒤집기 - Greedy (0) | 2021.08.01 |
---|---|
[Leetcode][python] 11: Container with most water - Two pointer (0) | 2021.07.15 |
[Leetcode][python] 14. Longest Common Prefix (0) | 2021.07.04 |
[Leetcode][python] 374. Guess Number Higher or Lower - Binary Search (0) | 2021.07.04 |
[leetcode][python] 278. First Bad Version - Binary Search (0) | 2021.07.04 |