You are viewing a single comment's thread. Return to all comments →
# Python3 def pickingNumbers(a): maxL = 0 for e,i in enumerate(a): x = [] x.append(i) A = a.copy() A.pop(e) for j in A: if j == x[0] or abs(j - x[0] == 1): x.append(j) if len(x) > maxL: maxL = len(x) return maxL
Seems like cookies are disabled on this browser, please enable them to open this website
Picking Numbers
You are viewing a single comment's thread. Return to all comments →