You are viewing a single comment's thread. Return to all comments →
what is the issue in my code I am getting time limit exceed. def gamingArray(arr): count =0 arrlen = len(arr) for i in range(arrlen): if len(arr)>0: idx=arr.index(max(arr)) arr=arr[:idx] count+=1 winner = "ANDY" if count % 2 == 0 else "BOB" return winner
what is the issue in my code I am getting time limit exceed.
def gamingArray(arr): count =0 arrlen = len(arr) for i in range(arrlen): if len(arr)>0: idx=arr.index(max(arr)) arr=arr[:idx] count+=1 winner = "ANDY" if count % 2 == 0 else "BOB" return winner
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 →