We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
My code runs normally in Jupyter but gives different results on this website. Could any please help? Thanks!
defminimumBribes(q):# Write your code heren=len(q)bribe_count={j:0forjinrange(n)}ifn==1:return0foriinrange(1,n):forjinrange(i):ifq[j]>q[i]:bribe_count[j]+=1sum_count=0forperson,countinbribe_count.items():ifcount>2:print('Toochaotic')returnsum_count+=countreturnsum_count
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
New Year Chaos
You are viewing a single comment's thread. Return to all comments →
My code runs normally in Jupyter but gives different results on this website. Could any please help? Thanks!