You are viewing a single comment's thread. Return to all comments →
my python solution.:
from collections import Counter def pickingNumbers(a): x = Counter(a) maxlen = 0 for i in x: current_len = x[i] + x.get(i+1, 0) maxlen = max(current_len, maxlen) return maxlen
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 →
my python solution.: