You are viewing a single comment's thread. Return to all comments →
**Simple Python code ** it passes all the test cases except 18,19,20
def gamingArray(arr): msx = max(arr) index = arr.index(msx) flag = 1 count = 0 if(index == 0): return "BOB" while(flag): arr = arr[:index] msx = max(arr) index = arr.index(msx) count += 1 if(index == 0): flag = 0 if(count%2==0): return "BOB" else: return "ANDY"
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 →
**Simple Python code ** it passes all the test cases except 18,19,20