<reponame>Next-Gen-UI/Code-Dynamics<filename>Leetcode/1000-2000/1893. Check if All the Integers in a Range Are Covered/1893-2.py
class Solution:
  def isCovered(self, ranges: List[List[int]], left: int, right: int) -> bool:
    seen = [0] * 52

    for l, r in ranges:
      seen[l] += 1
      seen[r + 1] -= 1

    for i in range(1, 52):
      seen[i] += seen[i - 1]

    return all(seen[i] for i in range(left, right + 1))

Check if All the Integers in a Range Are Covered/1893-2.py
class Solution:
  def isCovered(self, ranges: List[List[int]], left: int, right: int) -> bool:
    seen = [0] * 52

    for l, r in ranges:
      seen[l] += 1
      seen[r + 1] -= 1

    for i in range(1, 52):
      seen[i] += seen[i - 1]

    return all(seen[i] for i in range(left, right + 1))