2005. Check if All the Integers in a Range Are Covered
My accepted Python solution to LeetCode problem 2005, Check if All the Integers in a Range Are Covered, running in 0ms.
- Difficulty: Easy
- Python
- Runtime 0ms
- Memory 17.3MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 0ms, memory 17.3MB, accepted 2025-12-30.
class Solution:
def isCovered(self, ranges: List[List[int]], left: int, right: int) -> bool:
for num in range(left, right + 1):
covered = False
for start, end in ranges:
if start <= num <= end:
covered = True
break
if not covered:
return False
return True