You are viewing a single comment's thread. Return to all comments →
Python 3
def larrysArray(A): length = n while length > 2: num_index = A.index(length) A.pop(num_index) length -= 1 if (num_index - length)%2 == 1: temp = A.pop(-2) A.append(temp) if A == [1,2]: return "YES" return "NO"
Seems like cookies are disabled on this browser, please enable them to open this website
Larry's Array
You are viewing a single comment's thread. Return to all comments →
Python 3