• + 3 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'