You are given a groups of length n and an integer array nums.
You need to determine if it is possible to choose n disjoint subarrays from nums such that the groups[i], and the chosen subarrays appear in nums in the exact same relative order as they appear in groups.
Return true if you can choose n such disjoint subarrays, or false otherwise.
Note: Two subarrays are considered disjoint if they do not share any common elements (their index ranges in
numsdo not overlap).
Constraints:
groups.length
n
groups[i].length, groups[i].length
nums.length
groups[i][j], nums[k]
You are given a groups of length n and an integer array nums.
You need to determine if it is possible to choose n disjoint subarrays from nums such that the groups[i], and the chosen subarrays appear in nums in the exact same relative order as they appear in groups.
Return true if you can choose n such disjoint subarrays, or false otherwise.
Note: Two subarrays are considered disjoint if they do not share any common elements (their index ranges in
numsdo not overlap).
Constraints:
groups.length
n
groups[i].length, groups[i].length
nums.length
groups[i][j], nums[k]