We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defgamingArray(arr):# Write your code herehelper=sorted(arr,reverse=True)d=dict()foriinrange(len(arr)):d[arr[i]]=icount=0n=len(arr)-1formaxValinhelper:ifd[maxVal]<=n:n=d[maxVal]-1count+=1ifn<0:breakreturn'BOB'ifcount%2==1else'ANDY'
Cookie support is required to access HackerRank
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 →
Python3