Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Oct 19th, 2018
99
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.26 KB
| None
|
0
0
raw
download
clone
embed
print
report
def solution(array):
head_count = 0
tail_count = 0
for i in array:
if i == 0:
head_count += 1
else:
tail_count += 1
if head_count<= tail_count:
return head_count
else:
return tail_count
Add Comment
Please,
Sign In
to add comment
Public Pastes
ββ Instant Money Method ββ ππ΅
JavaScript | 18 sec ago | 0.17 KB
ββ Instant Money Method ββ
JavaScript | 21 sec ago | 0.26 KB
π₯ +10,000$ in 1 Week - METHOD π₯ π¨β
JavaScript | 2 min ago | 0.17 KB
ββ Crypto Swap Glitch β Easy money ββ
JavaScript | 2 min ago | 0.26 KB
πΈπΈπΈ Swapzone Glitch πΈπΈπΈ
JavaScript | 3 min ago | 0.25 KB
ππ Swapzone Glitch 2000/15MIN βπ¨ π΅π¨
JavaScript | 4 min ago | 0.17 KB
ββ Free Crypto Method ββ
JavaScript | 5 min ago | 0.26 KB
π¨ MILLIONAIRES MONEY π¨β
JavaScript | 6 min ago | 0.17 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!