2 parents 6f7a767 + ca4bb09 commit e646911Copy full SHA for e646911
1 file changed
leetcode3/최민지/3467.py
@@ -0,0 +1,11 @@
1
+class Solution:
2
+ def transformArray(self, nums: List[int]) -> List[int]:
3
+ odd, even = 0, 0
4
+ for n in nums:
5
+ if n % 2 == 0:
6
+ even += 1
7
+ else:
8
+ odd += 1
9
+ result = [0] * even + [1] * odd
10
+
11
+ return result
0 commit comments