You are viewing a single comment's thread. Return to all comments →
def pickingNumbers(a): a = sorted(a) start = a[0] length = 0 longest = 0 for i in a: if (i - start) <= 1: length += 1 else: start = i length = 1 longest = max(length, longest) return longest
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 →