2229. Check if an Array Is Consecutive Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 2229class Solution: def isConsecutive(self, nums: List[int]) -> bool: mi, mx = min(nums), max(nums) n = len(nums) return len(set(nums)) == n and mx == mi + n - 1