Hard
,Array
,Queue
,Sliding Window
2444. Count Subarrays With Fixed Bounds
You are given an integer array nums and two integers minK
and maxK
.
A fixed-bound subarray of nums
is a subarray that satisfies the following conditions:
minK
.maxK
.Return the number of fixed-bound subarrays.
A subarray is a contiguous part of an array.
Example 1:
Example 2:
Constraints:
nums.length
<= 105nums[i]
, minK
, maxK
<= 106Time:
Extra Space:
XD March 4, 2023