Skip to content

Commit 3a59f00

Browse files
authored
Create play-with-chips.py
1 parent ec0169b commit 3a59f00

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Python/play-with-chips.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution(object):
2+
def minCostToMoveChips(self, chips):
3+
"""
4+
:type chips: List[int]
5+
:rtype: int
6+
"""
7+
count = [0]*2
8+
for p in chips:
9+
count[p%2] += 1
10+
return min(count)

0 commit comments

Comments
 (0)