1426. Counting Elements Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 1426class Solution: def countElements(self, arr: List[int]) -> int: cnt = Counter(arr) return sum(v for x, v in cnt.items() if cnt[x + 1])