You are viewing a single comment's thread. Return to all comments →
I am really interested to know if there's any better solution than what mentioned below:
def compareTriplets(a, b): # Write your code here p1=p2=0 for i in range(len(a)): if a[i]>b[i]: p1+=1 elif a[i]<b[i]: p2+=1 return [p1,p2]
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
I am really interested to know if there's any better solution than what mentioned below: