You are given a 2D integer array ranges and two integers left and right. Each ranges[i] = [starti, endi] represents an inclusive interval between starti and endi.

Return true if each integer in the inclusive range [left, right] is covered by at least one interval in ranges. Return false otherwise.

An integer x is covered by an interval ranges[i] = [starti, endi] if starti &lt;= x &lt;= endi.

&nbsp;
Example 1:

Input: ranges = [[1,2],[3,4],[5,6]], left = 2, right = 5
Output: true
Explanation: Every integer between 2 and 5 is covered:
- 2 is covered by the first range.
- 3 and 4 are covered by the second range.
- 5 is covered by the third range.


Example 2:

Input: ranges = [[1,10],[10,20]], left = 21, right = 21
Output: false
Explanation: 21 is not covered by any range.


&nbsp;
Constraints:


	1 &lt;= ranges.length &lt;= 50
	1 &lt;= starti &lt;= endi &lt;= 50
	1 &lt;= left &lt;= right &lt;= 50


class Solution:
    def isCovered(self, ranges: List[List[int]], left: int, right: int) -> bool:
        
        
        t=[0]*(60)
        
        for i in ranges:
            
            t[i[0]]+=1
            t[i[1]+1]-=1
            
        for i in range(1,len(t)):
            t[i] += t[i-1]
            
        return min(t[left:right+1])>=1
        
        
        
        
        
class Solution {
    public boolean isCovered(int[][] ranges, int left, int right) {
        boolean flag = false;
        for (int i=left; i<=right; i++) {
            for (int[] arr: ranges) {
                if (i >= arr[0] && i <= arr[1]) {
                    flag = true;
                    break;
                }
            }
            if (!flag) return false;
            flag = false;
        }

        return true;
    }
}
class Solution {
public:
    bool isCovered(vector<vector<int>>& ranges, int left, int right) {
        int n = ranges.size();
        
        sort(ranges.begin(), ranges.end());
        
        if(left < ranges[0][0])                 //BASE CASE
            return false;
        
        bool ans = false;
        
        for(int i = 0; i < n; i++){
            if(left>=ranges[i][0] && left<=ranges[i][1]){
                left = ranges[i][1]+1;
            }
            if(left > right){
                ans = true;
                break;
            }
        }
        return ans;
    }
};
var isCovered = function(ranges, left, right) {
  var map=new Map()
  for(let i=left;i<=right;i++){
      map.set(i,0)
  }
  for(let range of ranges){
      for(let i=range[0];i<=range[1];i++){
          map.set(i,1)
      }
  }
    // console.log(map)
  for(let key of map.keys()){
      if(map.get(key)===0) return false
  }
    return true
};
Check if All the Integers in a Range Are Covered