1
2
3
4
5
6
|
class Solution:
def createTargetArray(self, nums: List[int], index: List[int]) -> List[int]:
target=[]
for i in range(len(nums)):
target.insert(index[i],nums[i])
return target
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
Leetcode 1773. Count Items Matching a Rule (0) | 2021.07.16 |
---|---|
Leetcode 1678. Goal Parser Interpretation (0) | 2021.07.16 |
Leetcode 1342. Number of Steps to Reduce a Number to Zero (0) | 2021.07.15 |
Leetcode 1281. Subtract the Product and Sum of Digits of an Integer (0) | 2021.07.15 |
Leetcode 1528. Shuffle String (0) | 2021.07.15 |
댓글