python-algorithm
Leetcode 1470. Shuffle the Array
무적김두칠
2021. 7. 13. 11:40
1
2
3
4
5
6
7
|
class Solution:
def shuffle(self, nums: List[int], n: int) -> List[int]:
tmp=[]
for i in range(n):
tmp.append(nums[i])
tmp.append(nums[n+i])
return tmp
|
cs |
반응형