https://leetcode.com/problems/split-the-array/description/
1 2 3 4 5 6 7 8 | class Solution: def isPossibleToSplit(self, nums: List[int]) -> bool: set_nums = list(set(nums)) for num in set_nums: if nums.count(num) >= 3: return False return True | cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 3083. Existence of a Substring in a String and Its Reverse (0) | 2024.04.24 |
---|---|
leetcode 3099. Harshad Number (0) | 2024.04.23 |
leetcode 3110. Score of a String (0) | 2024.04.22 |
백준 27736 찬반투표 (0) | 2024.04.21 |
leetcode 3120. Count the Number of Special Characters I (0) | 2024.04.21 |
댓글