You are viewing a single comment's thread. Return to all comments →
can someone explain what is wrong with this code-
def minimumBribes(q): # Write your code here res=0 for i in range(len(q)): if (i+1)<q[i]: r=q[i]-(i+1) if r>2: print("Too chaotic") return res+=r print(res) return
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 →
can someone explain what is wrong with this code-