Zero Array Transformation II

Given an integer array nums and a list of queries where each query is [start, end], return the minimum number of queries needed to make the array all zeros.

Examples
Input: [[2,0,2],[[0,1],[1,2]]]
Output: 2
Hints

Zero Array Transformation II

Given an integer array `nums` and a list of queries where each query is [start, end], return the minimum number of queries needed to make the array all zeros.