class Solution: def isGood(self, nums: List[int]) -> bool: nums.sort() good = list(range(1, len(nums))) + [len(nums)-1] return nums == good