• + 0 comments

    Python 3

    def pickingNumbers(a):
        arr = Counter(a)
        return max(arr[i]+arr.get(i+1,0) for i in arr)