Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Minimum Cost to Move Chips to The Same Position
DeepRest
Dec 6th, 2021
(
edited
)
67
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.19 KB
| None
|
0
0
raw
download
clone
embed
print
report
class
Solution:
def
minCostToMoveChips
(
self
,
position: List
[
int
]
)
-
>
int
:
odd
=
0
for
i
in
position:
odd +
=
i %
2
return
min
(
odd
,
len
(
position
)
- odd
)
Add Comment
Please,
Sign In
to add comment
Public Pastes
Vercel fix reload with Vite
JSON | 2 min ago | 0.07 KB
ДЗ Динамический массив
C# | 2 min ago | 2.10 KB
2 log
HTML | 7 min ago | 0.07 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🎁
GetText | 17 min ago | 0.38 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 20 min ago | 0.39 KB
example_compare_anagrams
Python | 23 min ago | 3.21 KB
is_anagram
Python | 24 min ago | 1.50 KB
List & Loops
YAML | 32 min ago | 1.27 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!