You are viewing a single comment's thread. Return to all comments →
Guys here's my code: Just keep traversing from left to right and keep track of the number larger than your previous maximum.
def gamingArray(arr): count=0 //Keeps track of number of turns played m=0 //Maximum Number for i in arr: if i>m: m=i count+=1 if count%2==0: return 'ANDY' return 'BOB'
Seems like cookies are disabled on this browser, please enable them to open this website
Gaming Array
You are viewing a single comment's thread. Return to all comments →
Guys here's my code: Just keep traversing from left to right and keep track of the number larger than your previous maximum.